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:34:38 +0000

On Jan 15, 2010, at 7:41 PM, glassfish_at_javadesktop.org wrote:

> Don't forget to make this work for the Filter way of configuring JAX-
> RS. When I use Jersey's servlet configuration, it doesn't handle
> any requests. Either that, or JSF stops working -- I forget. I had
> to use the Filter configuration instead.
>

OK! The place where i can set this is in the abstraction that supports
Servlet and Filter config parameters through a common interface.


> In a Java EE 6 environment, how will JAX-RS/Jersey be configured?

Currently it is only using Servlet (not filter). There are two options:

1) define an annotation for use on javax.ws.rs.core.Applcation classes.

2) Jersey's implementation detects portable filter declarations in the
web.xml

Could you log an issue for the latter against Jersey as that is
certain something i can easily fix without introducing any new
interface.


> It will not be in my web.xml, but maybe GlassFish provides a
> default web-fragment.xml or default web.xml that contains the
> servlet or filter way of configuring Jersey? What if it uses the
> servlet way of doing it, then JSF web apps stop working?

I think it might also depend on the URL patterns that are utilized.


> I didn't look deeper into the problem once I found that the filter
> configuration worked for me.
>

OK.

Paul.

>
> Thanks,
> Ryan
>
>> This sounds like a good idea. Sun should communicate
>> this information to all other JAX-RS implementations
>> so they can add the same GlassFish specific support.
>> Too bad this behavior wasn't defined by the JAX-RS
>> specification.
>>
>>
>> Thanks,
>> Ryan
>>
>>
>>> 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.
>>>
>>>
>>> Jan
> [Message sent by forum member 'rdelaplante' (ryan_at_ijws.com)]
>
> http://forums.java.net/jive/thread.jspa?messageID=381250
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>