.comment-link {margin-left:.6em;}

J. Daniel Ashton

www.flickr.com
This is a Flickr badge showing public photos from jdashton. Make your own badge here.
Whatever your hand finds to do, do it with all your might, —Ecclesiastes 9:10a NIV
The LORD God has told us what is right and what he demands:
"See that justice is done,
let mercy be your first concern,
and humbly obey your God." —Micah 6:8, CEV
With all your heart you must trust the LORD and not your own judgment.
Always let Him lead you, and He will clear the road for you to follow. —Proverbs 3:5,6 CEV

see also — My Homepage

My Photo
Name: Daniel Ashton
Location: Germantown, Maryland, United States


Any links with a dashed underscore probably point to Amazon.com

Sunday, July 23, 2006

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
http://localhost:8080/myapp/servlet/chapter2.SimpleServlet
to 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