Improve docs for MvcDefaultServletHandler container feature.
This commit is contained in:
parent
98d798dbe4
commit
4027cbd952
|
@ -34,6 +34,13 @@ import org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler
|
||||||
* able to invoke the above request handler.
|
* able to invoke the above request handler.
|
||||||
* </ul>
|
* </ul>
|
||||||
*
|
*
|
||||||
|
* This handler will forward all requests to the default Servlet. Therefore
|
||||||
|
* it is important that it remains last in the order of all other URL
|
||||||
|
* HandlerMappings. That will be the case if you use the {@link MvcAnnotationDriven}
|
||||||
|
* feature or alternatively if you are setting up your customized HandlerMapping
|
||||||
|
* instance be sure to set its "order" property to a value lower than that of
|
||||||
|
* the DefaultServletHttpRequestHandler, which is Integer.MAX_VALUE.
|
||||||
|
*
|
||||||
* @author Rossen Stoyanchev
|
* @author Rossen Stoyanchev
|
||||||
* @since 3.1
|
* @since 3.1
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -171,6 +171,10 @@
|
||||||
Configures a handler for serving static resources by forwarding to the Servlet container's default Servlet. Use of this
|
Configures a handler for serving static resources by forwarding to the Servlet container's default Servlet. Use of this
|
||||||
handler allows using a "/" mapping with the DispatcherServlet while still utilizing the Servlet container to serve static
|
handler allows using a "/" mapping with the DispatcherServlet while still utilizing the Servlet container to serve static
|
||||||
resources.
|
resources.
|
||||||
|
This handler will forward all requests to the default Servlet. Therefore it is important that it remains last in the
|
||||||
|
order of all other URL HandlerMappings. That will be the case if you use the "annotation-driven" element or alternatively
|
||||||
|
if you are setting up your customized HandlerMapping instance be sure to set its "order" property to a value lower than
|
||||||
|
that of the DefaultServletHttpRequestHandler, which is Integer.MAX_VALUE.
|
||||||
]]></xsd:documentation>
|
]]></xsd:documentation>
|
||||||
</xsd:annotation>
|
</xsd:annotation>
|
||||||
<xsd:complexType>
|
<xsd:complexType>
|
||||||
|
|
|
@ -3509,8 +3509,16 @@ application.version=1.0.0]]>
|
||||||
<para>
|
<para>
|
||||||
This tag allows for mapping the <code>DispatcherServlet</code> to "/" (thus overriding the mapping of the container's default Servlet),
|
This tag allows for mapping the <code>DispatcherServlet</code> 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
|
while still allowing static resource requests to be handled by the container's default Servlet. It configures a
|
||||||
<code>DefaultServletHttpRequestHandler</code> with a URL mapping (given a lowest precedence order) of "/**". This handler will
|
<code>DefaultServletHttpRequestHandler</code> with a URL mapping of "/**" and the lowest priority relative to other URL mappings.
|
||||||
forward all requests to the default Servlet. To enable this feature using the default setup, simply include the tag in the form:
|
</para>
|
||||||
|
<para>
|
||||||
|
This handler will forward all requests to the default Servlet. Therefore it is important that it remains last in the order of all
|
||||||
|
other URL <code>HandlerMappings</code>. That will be the case if you use <code><mvc:annotation-driven></code> or alternatively if you
|
||||||
|
are setting up your own customized <code>HandlerMapping</code> instance be sure to set its <code>order</code> property to a value lower than
|
||||||
|
that of the <code>DefaultServletHttpRequestHandler</code>, which is <code>Integer.MAX_VALUE</code>.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
To enable the feature using the default setup, simply include the tag in the form:
|
||||||
</para>
|
</para>
|
||||||
<programlisting language="xml"><![CDATA[
|
<programlisting language="xml"><![CDATA[
|
||||||
<mvc:default-servlet-handler/>]]>
|
<mvc:default-servlet-handler/>]]>
|
||||||
|
|
Loading…
Reference in New Issue