Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

tomcat servlet runing problem

 
felix thomas
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
I have tomcat 4.1.24 installed in my windows 98 SE machine.
Tomcat is working fine
I have purchased a Book Proffesional JSP second edition.
I was trying to run the MyfirstServlet example as described in the book

as written in the book
i made the following directories
webapps\ch03\WEB-INF\classes\com\wrox\projsp\ch03\myfirstwebapp

wrote the Myfirst.java code inside and it complied fine.
but when i tried to run the servler thru the URl as below
http://localhost:8080/ch03/servlet/com.wrox.projsp.ch03.myfirstwebapp.Myfirst
i get the below message what could be wrong
--------------------------------------------------------------------------------
type Status report
message /ch03/servlet/com.wrox.projsp.ch03.myfirstwebapp.Myfirst
description The requested resource (/ch03/servlet/com.wrox.projsp.ch03.myfirstwebapp.Myfirst) is not available.

--------------------------------------------------------------------------------
Apache Tomcat/4.1.24

when i copied the Myfirst class file in the examples directory and changed the url it ran fine.
what am i doing worng please help
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13071
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That has got to be the most common problem people have with Tomcat 4. When you run a servlet using the /servlet/ nomenclature, it actually goes through something called the "invoker" servlet.
There is a nice
tutorial on getting Tomcat 4 running here that discusses the invoker servlet. Or search the /conf/web.xml file for "invoker"
Bill
 
felix thomas
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks a lot Mr Brogden
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic