• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Error - HTTP Status 404

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 279
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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??
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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).
 
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic