users@jersey.java.net

Re: [Jersey] web.xml for multiple resource classes

From: Naresh <Srinivas.Bhimisetty_at_Sun.COM>
Date: Fri, 11 Sep 2009 11:42:10 +0530

Hi David,

  may be the recent Jersey Servlet 3.0 integration that Paul has done
would be helpful for you.
Please refer the samples that he has provided in the mail thread [1].
Please note, however, that you will have to add the following dependency
to be able to build and run the sample "annotatedapp" which uses the
@ApplicationPath annotation:

 <dependency>
            <groupId>javax.ws.rs</groupId>
            <artifactId>jsr311-api</artifactId>
            <version>1.1-ea</version>
  </dependency>


[1]
http://markmail.org/search/?q=Jersey%20servlet%203.0#query:Jersey%20servlet%203.0+page:1+mid:bi4orphv6sdyojjw+state:results


Hope this helps,
Naresh


dloy wrote:
> I have successfully been able to use a Jersey resource class using a
> web.xml containing only:
>
> <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
>
> Letting Jersey discover the resources.
>
> I now require having multiple classes that have overlapping resource
> @Path. What is the preferred method for directing Jersey to a
> specific class or project for resolving the resources.
>
> I've encountered a number of suggestions on the Web which resulted in:
>
> is not a super class of class com.sun.jersey.api.core.ResourceConfig
>
> Could someone direct me to documentation for doing this (an example
> would be useful if it requires class modification - extending
> ResourceConfig).
>
> Thanks
> David
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>