|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.solder.servlet.resource.WebResourceLocator
public class WebResourceLocator
A utility for classes that need to access web resources.
This class provides a way to obtain the location of web resources without using the ServletContext. This is
especially interesting for extensions that are executed very early in the CDI startup process because the
ServletContext may not be available in this stage.
The class makes use of the WebResourceLocationProvider SPI to actually find the resources. This allows to write
custom implementations optimized for specific environments.
WebResourceLocationProvider| Constructor Summary | |
|---|---|
WebResourceLocator()
|
|
| Method Summary | |
|---|---|
InputStream |
getWebResource(String path)
Returns the resource located at the named path as an InputStream object. |
URL |
getWebResourceUrl(String path)
Returns the URL for the resource located at the named path. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WebResourceLocator()
| Method Detail |
|---|
public InputStream getWebResource(String path)
InputStream object. The path must begin with a
/ and is interpreted as relative to the current context root.
path - The path of the resource (e.g. "/WEB-INF/web.xml")
InputStream or null if the resource could not be locatedpublic URL getWebResourceUrl(String path)
URL for the resource located at the named path. The path must begin with a
/ and is interpreted as relative to the current context root.
path - The path of the resource (e.g. "/WEB-INF/web.xml")
URL or null if the resource could not be located
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||