I am a newby in web development and I am struggling to create a simple rest web service using jersey, packed as an independent war file, to be deployed on tomcat 7.
I ha
This is similar to this SO question: "No provider classes found: when running Jersey REST example application".
The message "No provider classes found" is fine, no need to worry about it. For the URL http://localhost:8080/rest/hello
to work your WAR file needs to be called rest.war
. Then rest
becomes the context root. All the paths you define in the project's annotations are relative to the context root.
if you have called your project in eclipse: rest, so you should get the correct message: "Hello world!" from tomcat with the url:
http://localhost:8080/rest/hello.
If you for example have called your project: MyHello, with the code you posted the correct url should be:
http://localhost:8080/MyHello/hello
(The reason is that Eclipse create by default a war called as the name of the project and publish it to the tomcat server you have added in your configuration)
Let me know