|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectro.isdc.wro.model.resource.locator.wildcard.WildcardUriLocatorSupport
ro.isdc.wro.model.resource.locator.ServletContextUriLocator
public class ServletContextUriLocator
UriLocator capable to read the resources relative to servlet context. The resource reader will attempt to locate a physic resource under the servlet context and if the resource does not exist, will try to use requestDispatcher. This kind of resources will be accepted if their prefix is '/'.
| Field Summary | |
|---|---|
static String |
PREFIX
Prefix for url resources. |
| Constructor Summary | |
|---|---|
ServletContextUriLocator()
|
|
| Method Summary | |
|---|---|
boolean |
accept(String uri)
Check if this uri can be located by concrete implementation. |
static boolean |
isProtectedResource(String uri)
Check If the uri of the resource is protected: it cannot be accessed by accessing the url directly (WEB-INF folder). |
static boolean |
isValid(String uri)
Check if a uri is a servletContext resource. |
InputStream |
locate(String uri)
Locates the uri by retrieving the InputStream. |
| Methods inherited from class ro.isdc.wro.model.resource.locator.wildcard.WildcardUriLocatorSupport |
|---|
disableWildcards, getWildcardStreamLocator, newWildcardStreamLocator |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String PREFIX
| Constructor Detail |
|---|
public ServletContextUriLocator()
| Method Detail |
|---|
public boolean accept(String uri)
uri - to read.
public static boolean isValid(String uri)
uri - to check.
public static boolean isProtectedResource(String uri)
uri - the uri to check.
public InputStream locate(String uri)
throws IOException
uri - uri to read.
IOException - if the resource cannot be read for some reason.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||