public class DirectoryNameResourceProvider extends Object implements WebResourceLocationProvider
This implementation of WebResourceLocationProvider
will try to identify the location of web resources by searching
for a known resource on the classpath and trying to find the WEB-INF
directory in its path name. This will
typically work if the known resource in located in a JAR file inside the WEB-INF/lib
directory.
Compared to URLClassLoaderResourceProvider
this implementation works fine even for containers like JBoss AS6 and AS7.
Sortable.Comparator
Constructor and Description |
---|
DirectoryNameResourceProvider() |
Modifier and Type | Method and Description |
---|---|
int |
getPrecedence()
An integer precedence value that indicates how favorable the
implementation considers itself amongst alternatives.
|
URL |
getWebResource(String path,
ClassLoader classLoader)
Returns the location of a web resource.
|
public int getPrecedence()
Sortable
getPrecedence
in interface Sortable
public URL getWebResource(String path, ClassLoader classLoader)
WebResourceLocationProvider
getWebResource
in interface WebResourceLocationProvider
path
- The path of the resource to lookup (e.g. "/WEB-INF/web.xml")classLoader
- The classloader to use for resource lookupsnull
if the location could not be foundCopyright © 2008–2013 Seam Framework. All rights reserved.