cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <sberyoz...@gmail.com>
Subject Re: Seeming problem with definition of JAX-RS exception mappers
Date Sun, 30 Sep 2012 17:22:23 GMT
Hi Benson
On 30/09/12 15:22, Benson Margulies wrote:
> An exception mapper is for the entire service, not for a resource. And
> it has no access to the @Produces of a resource, nor to request
> headers. Doesn't this make it mighty difficult to be well-behaved?

You can inject @Context HttpHeaders and then get the list of acceptable 
types (sorted in the ascending order). That should help with setting the 
right content-type

Cheers, Sergey

Mime
View raw message