public class WebappClassTemplateLoader extends Object implements freemarker.cache.TemplateLoader
WebappTemplateLoader
and, if not
found, a ClassTemplateLoader
. The resources are loaded from the
webapp root and from the classpath root.Constructor and Description |
---|
WebappClassTemplateLoader(ServletContext servletContext)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
closeTemplateSource(Object templateSource) |
Object |
findTemplateSource(String name) |
long |
getLastModified(Object templateSource) |
Reader |
getReader(Object templateSource,
String encoding) |
public WebappClassTemplateLoader(ServletContext servletContext)
servletContext
- The servlet context.public Object findTemplateSource(String name) throws IOException
findTemplateSource
in interface freemarker.cache.TemplateLoader
IOException
public void closeTemplateSource(Object templateSource) throws IOException
closeTemplateSource
in interface freemarker.cache.TemplateLoader
IOException
public long getLastModified(Object templateSource)
getLastModified
in interface freemarker.cache.TemplateLoader
public Reader getReader(Object templateSource, String encoding) throws IOException
getReader
in interface freemarker.cache.TemplateLoader
IOException
Copyright © 2001-2017 The Apache Software Foundation. All Rights Reserved.