final class ServletResourceLoader extends Object implements ResourceLoader
ResourceLoader backed by ServletContext.| Constructor and Description |
|---|
ServletResourceLoader(javax.servlet.ServletContext context) |
| Modifier and Type | Method and Description |
|---|---|
URL |
getCatalogFile()
Gets the catalog XML file that should be consulted when
loading resources from this
ResourceLoader. |
URL |
getResource(String path)
Returns the actual location of the resource from the 'path'
that represents a virtual locaion of a file inside a web application.
|
Set<String> |
getResourcePaths(String path)
Returns the list of files in the given directory.
|
public ServletResourceLoader(javax.servlet.ServletContext context)
public URL getResource(String path) throws MalformedURLException
ResourceLoadergetResource in interface ResourceLoaderpath - Desiganates an absolute path within an web application, such as:
'/WEB-INF/web.xml' or some such.MalformedURLExceptionpublic URL getCatalogFile() throws MalformedURLException
ResourceLoaderResourceLoader.getCatalogFile in interface ResourceLoaderMalformedURLExceptionpublic Set<String> getResourcePaths(String path)
ResourceLoadergetResourcePaths in interface ResourceLoaderjavax.servlet.http.ServletContext#getResourcePaths(String)Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.