From 3d413d4f5574dd9ef3ab6ad3c7e6f0d612cd2b34 Mon Sep 17 00:00:00 2001 From: Jeremy Grelle Date: Tue, 3 Aug 2010 16:14:37 +0000 Subject: [PATCH] SPR-7116 - Added documentation for git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3521 50f2f4bb-b051-0410-bef5-90022cba6387 --- spring-framework-reference/src/mvc.xml | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/spring-framework-reference/src/mvc.xml b/spring-framework-reference/src/mvc.xml index 35191f79d06..ca24d78745f 100644 --- a/spring-framework-reference/src/mvc.xml +++ b/spring-framework-reference/src/mvc.xml @@ -3414,7 +3414,30 @@ application.version=1.0.0]]> -]]> +]]> + + +
+ mvc:default-servlet-handler + + This tag allows for mapping the DispatcherServlet to "/" (thus overriding the mapping of the container's default Servlet), + while still allowing static resource requests to be handled by the container's default Servlet. It configures a + DefaultServletHttpHandler with a URL mapping (given a lowest precedence order) of "/**". This handler will + forward all requests to the default Servlet. To enable this feature using the default setup, simply include the tag in the form: + + ]]> + + + The caveat to overriding the "/" Servlet mapping is that the RequestDispatcher for the default Servlet must be + retrieved by name rather than by path. The DefaultServletHttpHandler will attempt to auto-detect the default + Servlet for the container at startup time, using a list of known names for most of the major Servlet containers (including Tomcat, + Jetty, Glassfish, JBoss, Resin, WebLogic, and WebSphere). If the default Servlet has been custom configured + with a different name, or if a different Servlet container is being used where the default Servlet name is unknown, then the + default Servlet's name must be explicitly provided as in the following example: + + ]]>