File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes trouble with an example servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "trouble with an example servlet" Watch "trouble with an example servlet" New topic

trouble with an example servlet

dinesh prasad

Joined: Jun 03, 2003
Posts: 27
I'm installing a sample application from a book. I'm using Sun one Studio with Tomcat 4.1. I have a class file representing the servlet and a properties file. I'm putting the class file under /tomcat-home/webapps/ROOT/WEB-INF/classes. My book (written for tomcat 3.1) says to put the properties file in the root of the file system. I take that to mean webapps, root and tried WEB-INF. I get a 404 error.
Thanks for the help!
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

You are probably running into the fact that since Tomcat 4.1.12, the 'invoker' servlet is off by default.

If your URLs use the /servlet/className method of invoking servlets, then you'll need to enable the invoker servlet in conf/web.xml

Plenty of posts in Apache/Tomcat have more details.
I agree. Here's the link:
subject: trouble with an example servlet
It's not a secret anymore!