Class ServletContextResourceLoader

java.lang.Object
org.springframework.core.io.DefaultResourceLoader
org.springframework.web.context.support.ServletContextResourceLoader
All Implemented Interfaces:
ResourceLoader

public class ServletContextResourceLoader extends DefaultResourceLoader
ResourceLoader implementation that resolves paths as ServletContext resources, for use outside a WebApplicationContext (for example, in an HttpServletBean or GenericFilterBean subclass).

Within a WebApplicationContext, resource paths are automatically resolved as ServletContext resources by the context implementation.

Since:
1.0.2
Author:
Juergen Hoeller
See Also:
  • Constructor Details

    • ServletContextResourceLoader

      public ServletContextResourceLoader(ServletContext servletContext)
      Create a new ServletContextResourceLoader.
      Parameters:
      servletContext - the ServletContext to load resources with
  • Method Details