Home » Spring-Framework-090522 » org.springframework » web » context » support » [javadoc | source]
org.springframework.web.context.support
public class: ServletContextResourcePatternResolver [javadoc | source]
java.lang.Object
   org.springframework.core.io.support.PathMatchingResourcePatternResolver
      org.springframework.web.context.support.ServletContextResourcePatternResolver

All Implemented Interfaces:
    ResourcePatternResolver

ServletContext-aware subclass of PathMatchingResourcePatternResolver , able to find matching resources below the web application root directory via Servlet 2.3's ServletContext.getResourcePaths. Falls back to the superclass' file system checking for other resources.
Constructor:
 public ServletContextResourcePatternResolver(ServletContext servletContext) 
    Create a new ServletContextResourcePatternResolver.
    Parameters:
    servletContext - the ServletContext to load resources with
    Also see:
    ServletContextResourceLoader#ServletContextResourceLoader(javax.servlet.ServletContext)
 public ServletContextResourcePatternResolver(ResourceLoader resourceLoader) 
    Create a new ServletContextResourcePatternResolver.
    Parameters:
    resourceLoader - the ResourceLoader to load root directories and actual resources with
Method from org.springframework.web.context.support.ServletContextResourcePatternResolver Summary:
doFindPathMatchingFileResources,   doRetrieveMatchingServletContextResources
Methods from org.springframework.core.io.support.PathMatchingResourcePatternResolver:
convertClassLoaderURL,   determineRootDir,   doFindMatchingFileSystemResources,   doFindPathMatchingFileResources,   doFindPathMatchingJarResources,   doRetrieveMatchingFiles,   findAllClassPathResources,   findPathMatchingResources,   getClassLoader,   getJarFile,   getPathMatcher,   getResource,   getResourceLoader,   getResources,   isJarResource,   resolveRootDirResource,   retrieveMatchingFiles,   setPathMatcher
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.springframework.web.context.support.ServletContextResourcePatternResolver Detail:
 protected Set doFindPathMatchingFileResources(Resource rootDirResource,
    String subPattern) throws IOException 
    Overridden version which checks for ServletContextResource and uses ServletContext.getResourcePaths to find matching resources below the web application root directory. In case of other resources, delegates to the superclass version.
 protected  void doRetrieveMatchingServletContextResources(ServletContext servletContext,
    String fullPattern,
    String dir,
    Set result) throws IOException 
    Recursively retrieve ServletContextResources that match the given pattern, adding them to the given result set.