public class ServletContextLoader
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 static jakarta.servlet.ServletContext |
servletContext |
| Constructor and Description |
|---|
ServletContextLoader() |
| Modifier and Type | Method and Description |
|---|---|
long |
getLastModified(org.apache.velocity.runtime.resource.Resource resource)
Defaults to return 0
|
Reader |
getResourceReader(String source,
String encoding)
Get an InputStream 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)
Defaults to return false.
|
static void |
registerServletContext(jakarta.servlet.ServletContext servletContext) |
protected String[] paths
protected static jakarta.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 source, String encoding)
getResourceReader in class org.apache.velocity.runtime.resource.loader.ResourceLoadersource - name of template to getpublic 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.ResourceLoaderpublic static void registerServletContext(jakarta.servlet.ServletContext servletContext)
Copyright © 2023. All rights reserved.