org.springframework.web.context.support
Class ServletContextResourceLoader

java.lang.Object
  extended byorg.springframework.core.io.DefaultResourceLoader
      extended byorg.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.

Since:
1.0.2
Author:
Juergen Hoeller
See Also:
getResourceByPath(java.lang.String), HttpServletBean, GenericFilterBean

Field Summary
 
Fields inherited from interface org.springframework.core.io.ResourceLoader
CLASSPATH_URL_PREFIX
 
Constructor Summary
ServletContextResourceLoader(ServletContext servletContext)
          Create a new ServletContextResourceLoader.
 
Method Summary
protected  Resource getResourceByPath(String path)
          This implementation supports file paths beneath the root of the web application.
 
Methods inherited from class org.springframework.core.io.DefaultResourceLoader
getClassLoader, getResource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServletContextResourceLoader

public ServletContextResourceLoader(ServletContext servletContext)
Create a new ServletContextResourceLoader.

Parameters:
servletContext - the ServletContext to resolve resources with.
Method Detail

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:
ClassPathResource, FileSystemXmlApplicationContext.getResourceByPath(java.lang.String), AbstractRefreshableWebApplicationContext.getResourceByPath(java.lang.String)


Copyright (C) 2003-2004 The Spring Framework Project.