public class ServletContextResourceLoader extends DefaultResourceLoader
Within a WebApplicationContext, resource paths are automatically resolved as ServletContext resources by the context implementation.
getResourceByPath(java.lang.String)
,
ServletContextResource
,
WebApplicationContext
,
HttpServletBean
,
GenericFilterBean
DefaultResourceLoader.ClassPathContextResource
CLASSPATH_URL_PREFIX
Constructor and Description |
---|
ServletContextResourceLoader(ServletContext servletContext)
Create a new ServletContextResourceLoader.
|
Modifier and Type | Method and Description |
---|---|
protected Resource |
getResourceByPath(java.lang.String path)
This implementation supports file paths beneath the root of the web application.
|
addProtocolResolver, getClassLoader, getProtocolResolvers, getResource, setClassLoader
public ServletContextResourceLoader(ServletContext servletContext)
servletContext
- the ServletContext to load resources withprotected Resource getResourceByPath(java.lang.String path)
getResourceByPath
in class DefaultResourceLoader
path
- the path to the resourceServletContextResource