This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Reply locked New topic
Author

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
<web-app><servlet><servlet-name>serve</servlet-name><servlet-class>pleasework</servlet-class></servlet></web-app>
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
MCP


SCJO, SCJD, SCWCD, I-Net+, A+, Network+, MCSD, MCDBA, MCP, MCT
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

Hmm... cross posting.

See here: http://www.javaranch.com/ubb/Forum7/HTML/006859.html

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!)
 
wood burning stoves
 
subject: Error 404 with servlet in Tomcat
 
Similar Threads
404 error on calling my servlet
Servlet doesn't work
is this web.xml correct
why getting 404 error? page is there.
Is j2ee required for servlet?