Summary: | Servlet mapping not found when creating RequestDispatcher for forward() | ||
---|---|---|---|
Product: | Tomcat 8 | Reporter: | tomcatuser2008 |
Component: | Catalina | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | regression | ||
Priority: | P2 | ||
Version: | 8.0.14 | ||
Target Milestone: | ---- | ||
Hardware: | PC | ||
OS: | Linux |
Description
tomcatuser2008
2014-11-14 23:40:16 UTC
(In reply to tomcatuser2008 from comment #0) > We configure our Context in server.xml: Pretty much always a bad idea. > <Host name="localhost" appBase="" createDirs="false" unpackWARs="false" An empty appBase is asking for trouble. > <Context path="/" ...> This is an invalid path setting. To quote from section 3.5 of the servlet spec: Context Path: The path prefix associated with the ServletContext that this Servlet is a part of. If this context is the "default" context rooted at the base of the Web server's URL name space, this path will be an empty string. Otherwise, if the context is not rooted at the root of the server's name space, the path starts with a / character but does not end with a / character. You need to correct your configuration. The fact that something useful happened in prior versions is an accident. Context path values of "/" are now logged as invalid and converted to "". I backported the path checks to Tomcat 7 (r1640351). It will be in 7.0.58 onwards. For a record: The check and correction of context paths originates from r1080714 in 7.0.12 (3 years ago). Thus the fix was backported to Tomcat 7 as well. Thanks for your prompt responses. We'll change our config to <Context path="" ...>. |