i try to keep up with a java rest service. So i found some tutorials, which explain always the same way. But i cant get this running :(.
I made Dynamic Web Project in Version 2.5 and Tomcat 7.0 in eclipse. Then i load following jars to WEB-INF/lib
My Projectname is com.freespots.rest. I created following web.xml
Ok now iam going to create the java-class right? Well i did it Java Resources/src/com.freespots.rest.service:
If i start Tomcat and type url to my browser like localhost:8080/com.freespots.rest the Tomcat shows my index.html file. But if i go to url localhost:8080/com.freespots.rest/api/hello there is just a HTTP 404 Error:
Well iam new to Java Webdevelopment and i cant figure out my Problem. I hope some guy can explain my mistake. Thanks in advance.
You're using the old (1.x) Jersey configuration. In Jersey 2.x, the class namescpaces and property names have changed. You should instead use
See other deployment options here