tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gildas Cuisinier (Commented) (JIRA)" <>
Subject [jira] [Commented] (MTOMCAT-133) Servlet mapping to "/" does not work
Date Wed, 04 Apr 2012 19:56:19 GMT


Gildas Cuisinier commented on MTOMCAT-133:

The difference comes from the declaration of default servlets.

In the plugin, the declaration is made into "Tomcat" class, in the method initWebappDefaults.

 Wrapper servlet = addServlet(
                ctx, "default", "org.apache.catalina.servlets.DefaultServlet");

        // JSP servlet (by class name - to avoid loading all deps)
        servlet = addServlet(
                ctx, "jsp", "org.apache.jasper.servlet.JspServlet");
        servlet.addInitParameter("fork", "false");

And in this way, the wrapper is not set as overridable.

> Servlet mapping to "/" does not work 
> -------------------------------------
>                 Key: MTOMCAT-133
>                 URL:
>             Project: Apache Tomcat Maven Plugin
>          Issue Type: Bug
>          Components: tomcat7
>    Affects Versions: 2.0
>         Environment: Mac OS X, Apple JRE 1.6
>            Reporter: Gildas Cuisinier
>            Assignee: Olivier Lamy (*$^¨%`£)
> Using the Servlet 3.0 possibilities to add and configure servlet (ServletContainerInitializer
through Spring 3.1 WebApplicationInitializer), I try to map a servlet  "/", but is not working
> The servlet is started correctly, but the mapping does not work. 
> If I replace "/" by "test/*", everything work perfectly.
> For information, the "/" mapping works well in a standalone tomcat 7.0.25.
> I put a sample project on github that reproduce the bug :

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message