Tomcat 4.1.18 and servlets

I just discovered that in Tomcat 4.1.12 and upwards, the invoker servlet is disabled by default. The effect of this is that servlets which are not explicitly mapped in their webapps/WEB-INF/web.xml file will not be executed (you just get 404 not found).

To fix the problem you can either:

  • Map your servlet to a specific URL in web.xml like this:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"


  • Turn on the invoker servlet by changing Tomcat’s conf/web.xml file and uncommenting the Built-In Servlet Mapping for the invoker servlet.