Forums Register Login
Apache Tomcat and Servlet
I've downloaded Apache Tomcat and I am trying to test some servlets. My .jsp and .html files are working fine but when I am trying to load servlet through Browser it's giving.....
The requested resource (/servlet/HelloServlet) is not available
I've saved my HelloServlet.java file in ...
It is also not giving any compilation problem. My HelloServlet.class file is also in \WEB-INF dir.
can anybody give me idea why this is happening.
You might want to try mapping the servlet in a *-apps.xml file. I'm sorry if this is a little off as I can't look at my Tomcat config at the moment.
However, if you look in the conf directory, you should see a file that's named examples-apps.xml or something similar. Create one like that for your application (call it myApp-apps.xml, for example). That file will automatically be read when the server starts.
Let me know if that helps,
You'd probably get a lot better help in the Apache/Tomcat forum.
Your compiled servlets should be in the WEB-INF/classes directory in tomcat. That's the server can't find them.

Originally posted by Dave Vick:
Your compiled servlets should be in the WEB-INF/classes directory in tomcat.

Oh yeah - I forgot about the classes directory. Sorry. Dave's right.
Hey, sticks and stones baby. And maybe a wee mention of my stuff:
Rocket Oven Kickstarter - from the trailboss

This thread has been viewed 746 times.

All times above are in ranch (not your local) time.
The current ranch time is
Jul 22, 2018 14:38:25.