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