java.lang.ClassNotFoundException: com.sun.jersey.spi.container.servlet.ServletContainer

You have downloaded Jersey 2 (which RI of JAX-RS 2). The tutorial you’re referring to uses Jersey 1. Download Jersey 1.17.1 from (here), should be sufficient for you. Jersey 1 uses com.sun.jersey, and Jersey 2 uses org.glassfish.jersey hence the exception. Also note that also init-param starting with com.sun.jersey won’t be recognized by Jersey 2. Edit Registering Resources and Providers in Jersey 2 contains … Read more

org.glassfish.jersey.servlet.ServletContainer ClassNotFoundException

The problem: indicates that you try to use the Jersey 2.x servlet, but you are supplying the Jersey 1.x libs. For Jersey 1.x you have to do it like this: For more information check the Jersey 1.x documentation. If you instead want to use Jersey 2.x then you’ll have to supply the Jersey 2.x libs. In a maven based project you can use the following: For Jersey … Read more