users@glassfish.java.net

Re: JAX-RS error code 500 = GlassFish HTML error page

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Mon, 18 Jan 2010 12:22:37 +0000

On Jan 15, 2010, at 7:16 PM, Jan Luehe wrote:

> On 01/15/10 10:23 AM, Jan Luehe wrote:
>>
>> Paul,
>>
>> On 01/15/10 02:40 AM, Paul Sandoz wrote:
>>>
>>> On Jan 15, 2010, at 8:45 AM, Markus Karg wrote:
>>>
>>>> Sounds like a patch but not like a solution. People want out-of-
>>>> the-box Java EE correctness, not patches. At least me. ;-)
>>>>
>>>
>>> I think we are progressing to a good solution.
>>>
>>> Since, as i understand this, the default error page support is
>>> implementation specific feature then for Jersey we might be able
>>> to set a GF specific property on deployment via code. Jan, do you
>>> know if that would be possible per servlet?
>>
>> If we wanted to configure this on a per-servlet basis, one idea
>> would be to
>> leverage servlet init parameters.
>>
>> When Jersey's ServletContainerInitializer registers a Jersey
>> integration servlet,
>> it would also specify this init parameter.
>>
>> In case of an error, the web container could check if the target
>> servlet to which
>> the request was mapped was configured with this init parameter, and
>> disable
>> the default error page accordingly.
>>
>> This solution would not require any new property in sun-web.xml.
>>
>> What do you think?
>
> I should mention that by having Jersey's ServletContainerInitializer
> set the new init parameter, no developer involvement would be
> required,
> that is, the web container's default error page would be suppressed
> for any
> JAX-RS requests out-of-the-box, which is what Markus has been asking
> for.
>

+1

Paul.