users@jersey.java.net

Re: [Jersey] Explicit registration of Jersey servlet ?

From: Arun Gupta <Arun.Gupta_at_Sun.COM>
Date: Thu, 18 Feb 2010 16:30:42 -0800

Are there any plans to support an application as filter ?

BTW, I pushed out a new blog showing how to use Jersey with CDI at:

http://blogs.sun.com/arungupta/entry/totd_124_using_cdi_jpa

Thanks,
-Arun

Paul Sandoz wrote:
>
> On Feb 18, 2010, at 8:10 PM, Marc Hadley wrote:
>
>> IIRC, the concern was that a JAX-RS app deployed at with a mapping of
>> /* would hide any other content in the web application. E.g. if a
>> developer added a JSP or a servlet it wouldn't be reachable.
>>
>
> Right.
>
> Plus we currently do not support a defined application as a filter.
>
> Paul.
>
>> Marc.
>>
>> On Feb 18, 2010, at 1:04 PM, Moises Lejter wrote:
>>
>>> The changelog for JAX-RS 1.1 says,
>>>
>>> It is RECOMMENDED that implementations support the Servlet 3
>>> framework pluggability mechanism to enable portability between
>>> containers and to avail themselves of container-supplied class
>>> scanning facilities. When using the pluggability mechanism the
>>> following conditions MUST be met:
>>> • If no Application subclass is present the added servlet MUST be
>>> named "javax.ws.rs.core.Application" and all root resource classes
>>> and providers packaged in the web application MUST be included in the
>>> published JAX-RS application. The application MUST be packaged with a
>>> web.xml that specifies a servlet mapping for the added servlet.
>>> Though I have to confess I think I misread this: I thought that a web
>>> application with JAX-RS resources: (1) would not need an Application
>>> class, in which case all resources would be included
>>> (2) would magically find a new servlet named
>>> "javax.ws.rs.core.Application" added to its configuration at run time
>>> (3) *could* include only a <servlet-mapping> in its web.xml, for the
>>> magic entry in (2) - but would default to "/"
>>>
>>> Which I think is the behavior Arun expected, too. But I think my
>>> mistake was in (3) - in looking back at the quote from the changelog,
>>> it seems that there *must* be an explicit mapping in web.xml for the
>>> magic entry for the servlet in (2), even if it is just "/".
>>>
>>> So I am with Arun - why not default it to "/" ?
>>>
>>> Moises
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
>> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>

-- 
Need Application Server ? Download from http://glassfish.org
Blog: http://blogs.sun.com/arungupta