[jax-rs-spec users] [jsr339-experts] Re: WebApplicationException Response entity and exception mappers

From: Bill Burke <>
Date: Tue, 13 Nov 2012 14:31:46 -0500

Resteasy you can write an ExceptionMapper for any exception.

On 11/13/2012 12:25 PM, Sergey Beryozkin wrote:
> Hi,
> CXF user has pointed out that the specification requires that WAE
> exception mapper is not to be used to map a given WAE to Response if
> WAE Response entity is not null.
> Is it what Jersey and RestEasy do ? CXF lets custom WAE mappers manage
> all WAEs, though of course the custom mapper may choose to somehow
> modify the original WAE Response entity if any.
> I'd rather prefer the mappers see all WAEe (and say NotFoundException
> mappers see all the NFE exceptions, whether or not NFE Response entity
> is null), example, to make sure all WAE isntances can be given some
> common treatment like logging them, etc.
> Sergey

Bill Burke
JBoss, a division of Red Hat