File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes executing servlets in apache tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "executing servlets in apache tomcat" Watch "executing servlets in apache tomcat" New topic

executing servlets in apache tomcat

deepak borole

Joined: Nov 13, 2005
Posts: 25
how to execute servlets on apache tomcat 4.1.31.....please tell me the steps to be followed

Winners Dont Do Different Things, They Do Things Differently !!!
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63852

Did your version of Tomcat not come with documentation?

[Asking smart questions] [About Bear] [Books by Bear]
deepak borole

Joined: Nov 13, 2005
Posts: 25
i have copied the class file in
C:\Program Files\Apache Group\Tomcat 4.1\webapps\examples\WEB-INF\classes named HelloWorldExample and hav made entry in the web.xml file as


and executing it as


but gettin the 404 error
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

Have you checked the Tomcat logs?
Did you get rid of the examples that ship with Tomcat or did you add your servlet to the existing "examples" app?
If you added it, can you still run the other examples?
If not, have you checked the Tomcat logs to see if your addition blew up the app?

I believe that in Servlet Spec 2.3 compliant apps (which Tomcat 4.1 is) the order of elements in the web.xml file is critical.
If you didn't enter them in the correct order, you should see some Sax parse errors in the logs.

This sounds like more of a Tomcat issue than a servlet one.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
I agree. Here's the link:
subject: executing servlets in apache tomcat
It's not a secret anymore!