当前页面:
在线文档首页 >
Spring Framework 2.1.0 API 文档英文版
ServletContextResourceLoader (Spring Framework API 2.1) - Spring Framework 2.1.0 API 文档英文版
org.springframework.web.context.support
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 a 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:
getResourceByPath(java.lang.String)
,
ServletContextResource
,
WebApplicationContext
,
HttpServletBean
,
GenericFilterBean
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ServletContextResourceLoader
public ServletContextResourceLoader(ServletContext servletContext)
- Create a new ServletContextResourceLoader.
- Parameters:
servletContext
- the ServletContext to load resources with
getResourceByPath
protected Resource getResourceByPath(String path)
- This implementation supports file paths beneath the root of the web application.
- Overrides:
getResourceByPath
in class DefaultResourceLoader
- Parameters:
path
- path to the resource
- Returns:
- Resource handle
- See Also:
ServletContextResource
Copyright © 2002-2007 The Spring Framework.