users@jersey.java.net

Re: [Jersey] Viewable in ExceptionMapper

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Mon, 23 Feb 2009 09:09:35 +0100

On Feb 23, 2009, at 8:00 AM, Charles Brooking wrote:

> Hi all
>
>> This should be possible to fix by checking is there is a matched
>> resource available or not. In fact it seems useful to extend Viewable
>> so that a developer can specify a class for which resolving is
>> performed. By default this would be the matching class if any, but it
>> might make sense for you for it to be associated with the exception
>> mapper? that way you can place your views within a certain namespace.
>>
>> Could you log an issue? and i will work in fixing it.
>
> I've submitted a patch
>
> https://jersey.dev.java.net/issues/show_bug.cgi?id=226
>
> that avoids the IndexOutOfBoundsException, and allows for my
> particular
> use case (displaying essentially static JSP error pages) to work for
> the
> time being.

OK.


> No doubt there is more that could be done to improve support
> for rendering templates in response to exceptions.
>

Thanks.

Paul.