Ok ... for me, only servlet class assignment com.sum.jersey.spi.container.servlet.ServletContainer works fine, I use IDE (Eclipse Mars)
<servlet> <servlet-name>Jersey Web Application</servlet-name> <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>Jersey Web Application</servlet-name> <url-pattern>/frontend/*</url-pattern> </servlet-mapping>
but for some reason I had to restart my computer to work on my localhost. If still not working? You should add this code between your "servlet" tags in your web.xml.
<init-param> <param-name>com.sun.jersey.config.property.packages</param-name> <param-value>the.package.name</param-value> </init-param>
"the.package.name" is the name of the package in which you have classes. If you are using an IDE, upgrade the project and run Tomcat again. still not working? restart your computer and you will work.
user3945851 Aug 05 '15 at 17:22 2015-08-05 17:22
source share