users@jersey.java.net

[Jersey] Help needed with JAX-RS 2.0 and web.xml

From: Monika Solanki <monika.solanki_at_gmail.com>
Date: Fri, 21 Jun 2013 15:24:11 +0100

Hello,

I am not a maven user. I downloaded jaxrs-ri-2.0 today and tried to use
it with my web.xml from earlier jersey versions, which looks like this:

<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID"
version="3.0">
   <display-name>company1</display-name>
    <servlet>
     <servlet-name>Jersey REST1 Service</servlet-name>
<servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
     <init-param>
<param-name>com.sun.jersey.config.property.packages</param-name>
       <param-value>my.com.package</param-value>
     </init-param>
     <load-on-startup>1</load-on-startup>
   </servlet>
   <servlet-mapping>
     <servlet-name>Jersey REST1 Service</servlet-name>
     <url-pattern>/*</url-pattern>
   </servlet-mapping>
</web-app>

I just cannot get the app to deploy on tomcat, it complains about the
class com.sun.jersey.spi.container.servlet.ServletContainer, saying that
it cannot find it. How can the web.xml be fixed?

Thanks,

Monika