aspose file tools*
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


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Error - HTTP Status 404" Watch "Error - HTTP Status 404" New topic
Author

Error - HTTP Status 404

Chloe Loh
Greenhorn

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:
CATALINA_HOME=C:\Tomcat-4.1
JAVA_HOME=C:\jdk1.3.1
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
Greenhorn

Joined: Aug 27, 2002
Posts: 22
I have just found out the solution on the link as below:
http://www.moreservlets.com/Using-Tomcat-4.html
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:
<servlet-mapping>
<servlet-name>invoker</servlet-name>
<url-pattern>/servlet/*</url-pattern>
</servlet-mapping>
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: http://aspose.com/file-tools
 
subject: Error - HTTP Status 404