• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

trouble with an example servlet

 
dinesh prasad
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
Dinesh
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic