You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by "Gildas Cuisinier (Created) (JIRA)" <ji...@apache.org> on 2012/04/04 13:10:22 UTC
[jira] [Created] (MTOMCAT-133) Servlet mapping to "/" does not work
Servlet mapping to "/" does not work
-------------------------------------
Key: MTOMCAT-133
URL: https://issues.apache.org/jira/browse/MTOMCAT-133
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 properly.
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 : https://github.com/hikage/tomcat7-bug
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[jira] [Commented] (MTOMCAT-133) Servlet mapping to "/" does not
work
Posted by "Gildas Cuisinier (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MTOMCAT-133?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13246186#comment-13246186 ]
Gildas Cuisinier commented on MTOMCAT-133:
------------------------------------------
I try to map servlet to "/" in web.xml, that works.
For information, in Spring documentation, you have this quote :
{quote}
Mapping to '/' under Tomcat
Apache Tomcat maps its internal DefaultServlet to "/", and on Tomcat versions <= 7.0.14, this servlet mapping cannot be overridden programmatically. 7.0.15 fixes this issue. Overriding the "/" servlet mapping has also been tested successfully under GlassFish 3.1.
{quote}
The related issue in tomcat : https://issues.apache.org/bugzilla/show_bug.cgi?id=51278
> Servlet mapping to "/" does not work
> -------------------------------------
>
> Key: MTOMCAT-133
> URL: https://issues.apache.org/jira/browse/MTOMCAT-133
> 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 properly.
> 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 : https://github.com/hikage/tomcat7-bug
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[jira] [Commented] (MTOMCAT-133) Servlet mapping to "/" does not
work
Posted by "Gildas Cuisinier (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MTOMCAT-133?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13246314#comment-13246314 ]
Gildas Cuisinier commented on MTOMCAT-133:
------------------------------------------
Here is new information to solve this bug:
The code to add mapping :
ServletRegistration.Dynamic myServlet = servletContext.addServlet(//);
Set<String> conflicts = myServlet.addMapping("/");
In Tomcat 7 standalone, the conflits set is empty.
In Maven Tomcat 7 plugin, the conflicts set contains the String "/".
I investigate, and one difference I found is that the "Wrapper" for the jsp servlet and the default servlet is "overridable" in tomcat 7 but not in maven plugin context.
> Servlet mapping to "/" does not work
> -------------------------------------
>
> Key: MTOMCAT-133
> URL: https://issues.apache.org/jira/browse/MTOMCAT-133
> 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 properly.
> 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 : https://github.com/hikage/tomcat7-bug
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[jira] [Issue Comment Edited] (MTOMCAT-133) Servlet mapping to "/"
does not work
Posted by "Gildas Cuisinier (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MTOMCAT-133?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13246186#comment-13246186 ]
Gildas Cuisinier edited comment on MTOMCAT-133 at 4/4/12 11:44 AM:
-------------------------------------------------------------------
I try to map servlet to "/" in web.xml, that works.
For information, in Spring documentation, you have this quote :
Mapping to '/' under Tomcat
Apache Tomcat maps its internal DefaultServlet to "/", and on Tomcat versions <= 7.0.14, this servlet mapping cannot be overridden programmatically. 7.0.15 fixes this issue. Overriding the "/" servlet mapping has also been tested successfully under GlassFish 3.1.
The related issue in tomcat : https://issues.apache.org/bugzilla/show_bug.cgi?id=51278
was (Author: gcuisinier):
I try to map servlet to "/" in web.xml, that works.
For information, in Spring documentation, you have this quote :
{quote}
Mapping to '/' under Tomcat
Apache Tomcat maps its internal DefaultServlet to "/", and on Tomcat versions <= 7.0.14, this servlet mapping cannot be overridden programmatically. 7.0.15 fixes this issue. Overriding the "/" servlet mapping has also been tested successfully under GlassFish 3.1.
{quote}
The related issue in tomcat : https://issues.apache.org/bugzilla/show_bug.cgi?id=51278
> Servlet mapping to "/" does not work
> -------------------------------------
>
> Key: MTOMCAT-133
> URL: https://issues.apache.org/jira/browse/MTOMCAT-133
> 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 properly.
> 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 : https://github.com/hikage/tomcat7-bug
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[jira] [Commented] (MTOMCAT-133) Servlet mapping to "/" does not
work
Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MTOMCAT-133?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13247939#comment-13247939 ]
Hudson commented on MTOMCAT-133:
--------------------------------
Integrated in TomcatMavenPlugin-mvn3.x #123 (See [https://builds.apache.org/job/TomcatMavenPlugin-mvn3.x/123/])
[MTOMCAT-133] Servlet mapping to "/" does not work
apply same fix for the exec war feature. (Revision 1310131)
[MTOMCAT-133] Servlet mapping to "/" does not work
use the defaut web.xml (Revision 1310113)
Result = FAILURE
olamy : http://svn.apache.org/viewvc/?view=rev&rev=1310131
Files :
* /tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractExecWarMojo.java
* /tomcat/maven-plugin/trunk/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7Runner.java
olamy : http://svn.apache.org/viewvc/?view=rev&rev=1310113
Files :
* /tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractRunMojo.java
> Servlet mapping to "/" does not work
> -------------------------------------
>
> Key: MTOMCAT-133
> URL: https://issues.apache.org/jira/browse/MTOMCAT-133
> 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 (*$^¨%`£)
> Fix For: 2.0
>
>
> 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 properly.
> 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 : https://github.com/hikage/tomcat7-bug
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[jira] [Commented] (MTOMCAT-133) Servlet mapping to "/" does not
work
Posted by "Gildas Cuisinier (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MTOMCAT-133?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13246666#comment-13246666 ]
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");
servlet.setLoadOnStartup(1);
// JSP servlet (by class name - to avoid loading all deps)
servlet = addServlet(
ctx, "jsp", "org.apache.jasper.servlet.JspServlet");
servlet.addInitParameter("fork", "false");
servlet.setLoadOnStartup(3)
And in this way, the wrapper is not set as overridable.
> Servlet mapping to "/" does not work
> -------------------------------------
>
> Key: MTOMCAT-133
> URL: https://issues.apache.org/jira/browse/MTOMCAT-133
> 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 properly.
> 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 : https://github.com/hikage/tomcat7-bug
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[jira] [Closed] (MTOMCAT-133) Servlet mapping to "/" does not work
Posted by "Olivier Lamy (*$^¨%`£ Closed JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MTOMCAT-133?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Olivier Lamy (*$^¨%`£) closed MTOMCAT-133.
------------------------------------------
Resolution: Fixed
Fix Version/s: 2.0
fixed.
> Servlet mapping to "/" does not work
> -------------------------------------
>
> Key: MTOMCAT-133
> URL: https://issues.apache.org/jira/browse/MTOMCAT-133
> 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 (*$^¨%`£)
> Fix For: 2.0
>
>
> 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 properly.
> 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 : https://github.com/hikage/tomcat7-bug
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org