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 trouble loading servlet class on Tomcat4.1.24 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 "trouble loading servlet class on Tomcat4.1.24 " Watch "trouble loading servlet class on Tomcat4.1.24 " New topic

trouble loading servlet class on Tomcat4.1.24

newworld kingdom

Joined: Jun 21, 2003
Posts: 10
I installed Tomcat4.1.24. I could load jsp files in
TOMCAT_HOME/webapps/ROOT directory into browser like this:
but I could not load servlets classes from
TOMCAT_HOME/webapps/ROOT/WWEB-INF/classes into
the brwowser:
I found the "invoker" in the TOMCAT-HOME/conf/web.xml file , Turn it on ,just like this
But I still can't load servlet class after restart the server.
Anybody can help me? thanks!

Roger Chung-Wee
Ranch Hand

Joined: Sep 29, 2002
Posts: 1683
Try moving your servlet to /webapps/examples/WEB-INF/classes. The context path is already set for examples, so this should run your servlet:

SCJP 1.4, SCWCD 1.3, SCBCD 1.3
Serge Kurenkov

Joined: Jul 15, 2003
Posts: 13
\WEB-INF\web.xml :
browser url

Best regards.<br />------------------------<br />SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCEA 5, SCDJWS 5
Elinor Chang
Ranch Hand

Joined: Jul 30, 2003
Posts: 58
Just one more thing to Sergey Kurenkov's solution. I guess, you probably need to prefix the 'example' in your URL to invoke your servlet. It should look like the following

The more I learn, the less I know....<br /> <br />SCJP2 <br />SCWCD
I agree. Here's the link:
subject: trouble loading servlet class on Tomcat4.1.24
It's not a secret anymore!