Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Tomcat and the fly likes Error 404 with servlet in Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Reply locked New topic

Error 404 with servlet in Tomcat

Ray Smilgius
Ranch Hand

Joined: Jan 29, 2001
Posts: 120
Now when i try to run my own servlets on newly installed Tomcat , for eg with following settings:
In folder %Tomcat_Home%\webapps\FortKnox folloing files are there :
- index.jsp
- WEB-INF\classes\pleasework.class
- WEB-INF\web.xml

C:\jarkarta-tomcat-4.0\webapps\FortKnox\WEB_INF\classes //my servlet is here called 'pleasework.class'

//web.xml file below
my port has been changed to 80 instead of 8080
Now when i request : <http://localhost/FortKnox>
tomcat responds with 'index.jsp' correctly
But when i request : <http://localhost/FortKnox/servlet/serve>
Browser 404 file not found:
I tryed this as well
But when i request : <http://localhost/FortKnox/serve>
Browser 404 file not found:
No success any help greatly appreciated I have my code written just need to get these path issues resolved.
Thanks Ray Smilgius

Sun Certified Java Programmer
Sun Certified Java Developer
I-Net Certified
A+ Certified
Network+ Certified

Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

Hmm... cross posting.

See here:

I know it's a bit of a pain everyone, but try to keep this for issues that you believe are ONLY related to Tomcat/Apache.

Hard to know when you're completely new to servlet/jsp's, I know. (ie: If I knew what my problem was, I'd fix it!)
I agree. Here's the link:
subject: Error 404 with servlet in Tomcat
jQuery in Action, 3rd edition