public class WebappResourceLoader
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 |
protected HashMap |
templatePaths |
| Constructor and Description |
|---|
WebappResourceLoader() |
| Modifier and Type | Method and Description |
|---|---|
long |
getLastModified(org.apache.velocity.runtime.resource.Resource resource)
Checks to see when a resource was last modified
|
Reader |
getResourceReader(String name,
String encoding)
Get Reader so that the Runtime can build a
template with it.
|
void |
init(org.apache.velocity.util.ExtProperties configuration)
This is abstract in the base class, so we need it.
|
boolean |
isSourceModified(org.apache.velocity.runtime.resource.Resource resource)
Checks to see if a resource has been deleted, moved or modified.
|
protected String[] paths
protected HashMap templatePaths
protected javax.servlet.ServletContext servletContext
public void init(org.apache.velocity.util.ExtProperties configuration)
init in class org.apache.velocity.runtime.resource.loader.ResourceLoaderconfiguration - the ExtProperties associated with
this resource loader.public Reader getResourceReader(String name, String encoding) throws org.apache.velocity.exception.ResourceNotFoundException
getResourceReader in class org.apache.velocity.runtime.resource.loader.ResourceLoadername - name of template to getencoding - asked encodingorg.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.ResourceLoaderresource - Resource The resource to check for modificationpublic long getLastModified(org.apache.velocity.runtime.resource.Resource resource)
getLastModified in class org.apache.velocity.runtime.resource.loader.ResourceLoaderresource - Resource the resource to checkCopyright © 2002–2021 The Apache Software Foundation. All rights reserved.