404 when accessing Jersey app in Tomcat 7

后端 未结 2 1492
我寻月下人不归
我寻月下人不归 2021-01-25 04:01

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

2条回答
  •  遇见更好的自我
    2021-01-25 04:14

    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.

提交回复
热议问题