| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.cayenne.util.ResourceLocator
org.apache.cayenne.util.WebApplicationResourceLocator
public class WebApplicationResourceLocator
A ResourceLocator that can find resources relative to web application context.
| Field Summary | |
|---|---|
| protected  List<String> | additionalContextPaths | 
| protected  javax.servlet.ServletContext | context | 
| Fields inherited from class org.apache.cayenne.util.ResourceLocator | 
|---|
| additionalClassPaths, additionalFilesystemPaths, classLoader, skipAbsolutePath, skipClasspath, skipCurrentDirectory, skipHomeDirectory | 
| Constructor Summary | |
|---|---|
| WebApplicationResourceLocator() | |
| WebApplicationResourceLocator(javax.servlet.ServletContext context)Creates new WebApplicationResourceLocator with default lookup policy including user home directory, current directory and CLASSPATH. | |
| Method Summary | |
|---|---|
|  void | addFilesystemPath(String path)Override ResourceLocator.addFilesystemPath(String) to intercept context paths starting with "/WEB-INF/" to place in additionalContextPaths. | 
|  URL | findResource(String location)Looks for resources relative to /WEB-INF/ directory or any extra context paths configured. | 
|  javax.servlet.ServletContext | getServletContext()Gets the ServletContext used to locate resources. | 
|  void | setServletContext(javax.servlet.ServletContext servletContext)Sets the ServletContext used to locate resources. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected javax.servlet.ServletContext context
protected List<String> additionalContextPaths
| Constructor Detail | 
|---|
public WebApplicationResourceLocator()
public WebApplicationResourceLocator(javax.servlet.ServletContext context)
| Method Detail | 
|---|
public void setServletContext(javax.servlet.ServletContext servletContext)
public javax.servlet.ServletContext getServletContext()
public URL findResource(String location)
findResource in class ResourceLocatorpublic void addFilesystemPath(String path)
addFilesystemPath in class ResourceLocator| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||