File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Help. Tomcat installed - can't see servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Help. Tomcat installed - can Watch "Help. Tomcat installed - can New topic

Help. Tomcat installed - can't see servlet

Ted Li

Joined: Jan 16, 2003
Posts: 2
I just bought Manning book and start studying and tinkering around with tomcat
I am running Windows XP Pro, j2sdk 4.1, tomcat 4.1
I followed the instructions in Appendix A of
manning book. Tomcat seems to be running fine since I can view he default index.jsp file at
I copied chapter01 files to webapp and try to view it by
and I get an error from Apache Tomcat.
http status 404 - /chapter01/servlet/HelloWorldServlet.
type status report
message /chapter01/servlet/HelloWorldServlet
description the requested resource (/chapter01/servlet/HelloWorldServlet) is not available
I checked my CATALINA_HOME, JAVA_HOME, CLASSPATH. file structure. I think everything is fine.
Help please...I am running out of things to check
Sam Dalton
Ranch Hand

Joined: Jul 26, 2001
Posts: 170
I suspect you should be able to access it at
If that does not work, check the web.xml file to find out which name HelloWorldServlet is mapped to.

<a href="" target="_blank" rel="nofollow">Sam Dalton</a>,<br />Co-author of []Professional JSP 2.0[/URL] (October 2003)<br />Co-author of <a href="" target="_blank" rel="nofollow">Professional SCWCD Certification</a><br />Co-author of <a href="" target="_blank" rel="nofollow">Professional Java Servlets 2.3</a>
Ted Li

Joined: Jan 16, 2003
Posts: 2
I tried
and I get the same error. and I checked web.xml the <servlet-name> is the same "HelloWorldServlet"
Anybody has any other suggestions?
boyet silverio
Ranch Hand

Joined: Aug 28, 2002
Posts: 173
I tried
i think Sam's suggestion on seeing where '..HelloWorldServlet maps to.' is to look
for something like the following in your web.xml.
if there isn't then try to append it after </servlet>, restart tomcat, and see how it works.
this associates the <url-pattern> with the <servlet-name> you defined in <servlet>...</servlet> so you can use the url you just tried.
hope this helps.
[ January 16, 2003: Message edited by: boyet silverio ]
wooddonkey Qian

Joined: Jan 17, 2003
Posts: 1
add the following element to web.xml:
I agree. Here's the link:
subject: Help. Tomcat installed - can't see servlet
It's not a secret anymore!