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
| Modifier and Type | Field and Description |
|---|---|
| private DefaultServletHttpRequestHandler | |
| private final ServletContext |
| Access | Constructor and Description |
|---|---|
| public | DefaultServletHandlerConfigurer(ServletContext
the ServletContext to use. servletContext)Create a |
| Modifier and Type | Method and Description |
|---|---|
| protected SimpleUrlHandlerMapping | buildHandlerMapping()
Return a handler mapping instance ordered at |
| public void | |
| public void |
| handler | back to summary |
|---|---|
| private DefaultServletHttpRequestHandler handler
| |
| servletContext | back to summary |
|---|---|
| private final ServletContext servletContext | |
| DefaultServletHandlerConfigurer | back to summary |
|---|---|
| public DefaultServletHandlerConfigurer(ServletContext servletContext) Create a
| |
| buildHandlerMapping | back to summary |
|---|---|
| protected SimpleUrlHandlerMapping buildHandlerMapping() Return a handler mapping instance ordered at
| |
| enable | back to summary |
|---|---|
| public void enable() Enable forwarding to the "default" Servlet. When this method is used the
| |
| enable | back to summary |
|---|---|
| public void enable(String defaultServletName) Enable forwarding to the "default" Servlet identified by the given name. This is useful when the default Servlet cannot be autodetected, for example when it has been manually configured.
| |