Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
    Bookmark Topic Watch Topic
  • New Topic

Error 404 with servlet in Tomcat

 
Ray Smilgius
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Report post to moderator
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!)
 
    Bookmark Topic Watch Topic
  • New Topic