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

Error - HTTP Status 404

Chloe Loh

Joined: Aug 27, 2002
Posts: 22
Hi there,
I had installed the tomcat 4.1.18 in my machine,
I configure the system variables as below:
I copied HelloWorldServlet.class(one servlet) to C:\Tomcat-4.1\webapps\chapter01\WEB-INF\classes and also its web.xml into the web-inf folder.
and I started tomcat and tried to connect to the URL(http://localhost:8080/chapter01/servlet/HelloWorldServlet).
it gave me this message:
HTTP Status 404 -/chapter01/servlet/HelloWorldServlet.
I did the same thing when I installed tomcat4.0 and it works fine.
I have looked at the tomcat 4.1.18 documentation but still can't get the clue. Hope somebody here can help. Thanks first.....
Chloe Loh

Joined: Aug 27, 2002
Posts: 22
I have just found out the solution on the link as below:
I've got this resource in javaranch.
Thank you very much.
Alfred Kemety
Ranch Hand

Joined: Aug 14, 2002
Posts: 279
I followed the tutorial, I un-commented:
in the conf/web.xml
but still my HelloWorld is not working, when I copied it to webapp/examples/classes, instead of webapp/ROOT/classes.. it worked fine and no more 404s
What should I do to make it work in the ROOT? and I need explanation to whatever code I will have to add to the web.xml file in the ROOT/WEB-INF directory.... I want to understand and make it work in the same time....
anyone to help??

Alfred Raouf - Egypt - SCJP 1.4<br />Kemety.equals(Egyptian) // returns true
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

you restarted after uncommenting the mapping?

And it would work in the examples application because the web.xml file under examples/WEB-INF already contained a servlet/* mapping.

This was discussed here (start reading posts in the year 2003; ignore the posts from 2002).
I agree. Here's the link:
subject: Error - HTTP Status 404
jQuery in Action, 3rd edition