users@glassfish.java.net

Re: [Jersey] Jersey/JAX-RS integration with Servlet 3.0

From: Naresh <Srinivas.Bhimisetty_at_Sun.COM>
Date: Thu, 03 Sep 2009 14:56:48 +0530

Paul Sandoz wrote:
> Hi,
>
> I have just implemented Servlet 3.0 integration into Jersey so that it
> is no longer necessary to utilize web.xml (or if utilized it is not
> necessary to declare the servlet class).
Great.
>
> To experiment you need to use Jersey 1.1.3-ea-SNAPSHOT and build 61 or
> greater of GF v3. Currently i have only tested on promoted build 61 of
> GF v3.
>
> Attached are some maven-based samples. Naresh, these samples could
> form the basis of some functional tests, but they do not fully cover
> all cases, see the following code to get an understand of what else
> needs to be tested:
>
>
> http://fisheye4.atlassian.com/browse/jersey/trunk/jersey/jersey-server/src/main/java/com/sun/jersey/server/impl/container/servlet/JerseyServletContainerInitializer.java?r=2735
Sure. I shall add them to the QE test suite.

Thanks,
Naresh
>
>
> Jersey will use it's implementation of the Servlet 3.0
> ServletContainerInitializer interface to detect classes that extend
> from javax.ws.rs.core.Application.
>
> For example. the "annotatedapp" sample contains the following class:
>
> @ApplicationPath("/oneonly")
> public class OneApplication extends Application {
> @Override
> public Set<Class<?>> getClasses() {
> return Collections.<Class<?>>singleton(One.class);
> }
> }
>
> A Jersey servlet will be registered at the mapping "/oneonly/*" using
> OneApplication as the class that registers root resource and provider
> classes.
>
> Paul.
>
>
>
>
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net