I am trying to run one simple web application. I have imported required jar in which i have defined my servlet class.
and defined servlet name and complete path of class. But when I am running my web application on tomcat it gives me errror like servlet not found.
Please give me some pointers it will be appreciated. Thanks in advance.
I have checked location of following class in my jar it is fine. com.sun.jersey.spi.container.servlet.ServletContainer
Where is this located inside the container (directory layout)? Give more details about your environment etc.. And how you access the servlet. Check the server logs after you deployed the app to see any errors if any.
Actually I have putted that jar under source folder and I am trying to run application in eclipse, run as->run on server
I don't know what is written inside that ServletContainer class because it is .class file. Basically I have written one sample Web service in JAX-rs
and I wanted to call Web service but it fail to run servlet itself. Please give me some pointer.
The Jersey library does not do anything useful with HTTP requests, unless you configure at least one REST resource using an @Path annotation in a resource class. And then the URL would most likely not be the root URL, since you'd generally want to deploy more than one resource class, each configured for a different URL.
Do you see messages in the log file like "INFO: Root resource classes found:
As an aside, note that jar files go into the WEB-INF/lib directory of the web app for live deployments.