Roma Kap Roma Kap - 1 year ago 168
reST (reStructuredText) Question

Tomcat, The requested resource is not available

i have some troubles with tomcat.
I have simple REST-Service with Jersey/Tomcat.
But my Get-Ressource could not be find and Post probably too.

My Code:

public class NothificationListner {

public String pojo() {"[GET] REQUEST RECEIVED");
return "[GET] pojo ok @ " + new Date().toString();

My Web.xml




I export my Project "myProg" as war-file into "C:\apache-tomcat-8.0.37\webapps\"
Tomcat starts without errors.
Tomcat creates folder "myProg", which contains everything:

NothificationListner .class
NothificationListner .java
"containts all libs for application"

And when i try to call: localhost:8080/myProg/NothificationListner
I get 404, The requested resource is not available.

Answer Source

You're supposed to list the packages where your resource classes are here


I don't know what jersey is, but from your post, the listener is in the com.listner package. If you have other packages, you can separate them with a comma or semi-colon