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.

DefaultServletHandlerConfigurer

servletContext - the ServletContext to use to configure the underlying DefaultServletHttpRequestHandler.

Method Detail

enable

public void enable()

Enable forwarding to the "default" Servlet. When this method is used the DefaultServletHttpRequestHandler
will try to auto-detect the "default" Servlet name. Alternatively, you can specify the name of the default
Servlet via enable(String).