Home » freemarker-2.3.13 » freemarker.cache » [javadoc | source]
freemarker.cache
public class: WebappTemplateLoader [javadoc | source]
java.lang.Object
   freemarker.cache.WebappTemplateLoader

All Implemented Interfaces:
    TemplateLoader

A TemplateLoader that uses streams reachable through ServletContext#getResource(String) as its source of templates.
Constructor:
 public WebappTemplateLoader(ServletContext servletContext) 
    Creates a resource template cache that will use the specified servlet context to load the resources. It will use the base path of "/" meaning templates will be resolved relative to the servlet context root location.
 public WebappTemplateLoader(ServletContext servletContext,
    String path) 
    Creates a template loader that will use the specified servlet context to load the resources. It will use the specified base path. The is interpreted as relative to the current context root (does not mater if you start it with "/" or not). Path components should be separated by forward slashes independently of the separator character used by the underlying operating system.
Method from freemarker.cache.WebappTemplateLoader Summary:
closeTemplateSource,   findTemplateSource,   getLastModified,   getReader
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from freemarker.cache.WebappTemplateLoader Detail:
 public  void closeTemplateSource(Object templateSource) throws IOException 
 public Object findTemplateSource(String name) throws IOException 
 public long getLastModified(Object templateSource) 
 public Reader getReader(Object templateSource,
    String encoding) throws IOException