|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer
public class DefaultServletHandlerConfigurer
Configures a request handler for serving static resources by forwarding the request to the Servlet container's
"default" Servlet. This is indended to be used when the Spring MVC DispatcherServlet is mapped to "/"
thus overriding the Servlet container's default handling of static resources. Since this handler is configured
at the lowest precedence, effectively it allows all other handler mappings to handle the request, and if none
of them do, this handler can forward it to the "default" Servlet.
DefaultServletHttpRequestHandler| Constructor Summary | |
|---|---|
DefaultServletHandlerConfigurer(ServletContext servletContext)
Create a DefaultServletHandlerConfigurer instance. |
|
| Method Summary | |
|---|---|
void |
enable()
Enable forwarding to the "default" Servlet. |
void |
enable(String defaultServletName)
Enable forwarding to the "default" Servlet identified by the given name. |
protected AbstractHandlerMapping |
getHandlerMapping()
Return a handler mapping instance ordered at Integer.MAX_VALUE containing the
DefaultServletHttpRequestHandler instance mapped to "/**"; or null if
default servlet handling was not been enabled. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultServletHandlerConfigurer(ServletContext servletContext)
DefaultServletHandlerConfigurer instance.
servletContext - the ServletContext to use to configure the underlying DefaultServletHttpRequestHandler.| Method Detail |
|---|
public void enable()
DefaultServletHttpRequestHandler
will try to auto-detect the "default" Servlet name. Alternatively, you can specify the name of the default
Servlet via enable(String).
DefaultServletHttpRequestHandlerpublic void enable(String defaultServletName)
DefaultServletHttpRequestHandlerprotected AbstractHandlerMapping getHandlerMapping()
Integer.MAX_VALUE containing the
DefaultServletHttpRequestHandler instance mapped to "/**"; or null if
default servlet handling was not been enabled.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||