Difference between com.sun.jersey.spi.container.servlet.ServletContainer and com.sun.jersey.spi.container.servlet.ServletContainer

In this article we will see some of the differences between Jersey 1.x and Jersey 2.x . here I am going to explain what is the main web.xml configuration change in Jersey 1.x and Jersey 2.x frameworks .

 

In Jersey 1.x Framework we configure com.sun.jersey.spi.container.servlet.ServletContainer as servlet in web.xml , where as in  Jersey 2.0 on wards we are using org.glassfish.jersey.servlet.ServletContainer  to configure in web.xml.

And also <init-param> configurations changed in both Jersey 1.x and Jersey 2.x frameworks , see the below sample web.xml configurations for both versions.

 

Jersey 1.x configuration

 

 

 

Jersey 2.x configuration

 

 

 

if we can see carefully the in above sample web.xml code snippets , we can get know the main difference in web.xml configurations.

 

Download specific version jars:

 Click  here to download Jersey 1.x jars

 Click here to download Jersey 2.x jars

 

 

 

 

Posted in webservices and tagged .

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">