public class WebAppLoader
extends org.apache.velocity.runtime.resource.loader.ResourceLoader
| Modifier and Type | Field and Description |
|---|---|
protected String[] |
paths
The root paths for templates (relative to webapp's root).
|
protected javax.servlet.ServletContext |
servletContext |
| Constructor and Description |
|---|
WebAppLoader() |
| Modifier and Type | Method and Description |
|---|---|
long |
getLastModified(org.apache.velocity.runtime.resource.Resource resource)
Defaults to return 0
|
InputStream |
getResourceStream(String name)
Get an InputStream so that the Runtime can build a template with it.
|
void |
init(org.apache.commons.collections.ExtendedProperties configuration)
This is abstract in the base class, so we need it.
|
boolean |
isSourceModified(org.apache.velocity.runtime.resource.Resource resource)
Defaults to return false.
|
protected String[] paths
protected javax.servlet.ServletContext servletContext
public void init(org.apache.commons.collections.ExtendedProperties configuration)
init in class org.apache.velocity.runtime.resource.loader.ResourceLoaderconfiguration - the ExtendedProperties associated with this resource
loader.public InputStream getResourceStream(String name) throws org.apache.velocity.exception.ResourceNotFoundException
getResourceStream in class org.apache.velocity.runtime.resource.loader.ResourceLoadername - name of template to getorg.apache.velocity.exception.ResourceNotFoundException - if template not found in classpath.public boolean isSourceModified(org.apache.velocity.runtime.resource.Resource resource)
isSourceModified in class org.apache.velocity.runtime.resource.loader.ResourceLoaderpublic long getLastModified(org.apache.velocity.runtime.resource.Resource resource)
getLastModified in class org.apache.velocity.runtime.resource.loader.ResourceLoaderCopyright © 2013 Atlassian. All Rights Reserved.