Tomcat Default Config Changed
I've been trying to work my way through a book on Struts. It spent a chapter (for which I'm grateful) on basic servlets and JSPs, and walked me through a quick installation of Tomcat and some sample code.
Unfortunately, the basic instructions on how to test your first servlet were, apparently, wrong. The instructions state that you can use a URL like
Here's the catch. In Tomcat 4.1.12 and later, the default servlet runner is called the
Having discovered this, I'm now a happier camper. The instructions in the book were not wrong: they simply didn't anticipate that
Unfortunately, the basic instructions on how to test your first servlet were, apparently, wrong. The instructions state that you can use a URL like
http://localhost:8080/myapp/servlet/chapter2.SimpleServletto reach your servlet. However, nothing I could do with
myapp/servlet
would work.Here's the catch. In Tomcat 4.1.12 and later, the default servlet runner is called the
invoker
servlet, and the default path for it is disabled. In order to enable this functionality, you need to edit install_dir/conf/web.xml
and remove the comment marks surrounding the invoker
servlet mapping. Now that I know what to search for, it's not too hard to find this FAQ on the Tomcat site.Having discovered this, I'm now a happier camper. The instructions in the book were not wrong: they simply didn't anticipate that
invoker
would be disabled in future versions of Tomcat.
0 Comments:
Post a Comment
Links to this post:
Create a Link
<< Home