org.apache.struts2.components.template
Class FreemarkerTemplateEngine
java.lang.Object
   org.apache.struts2.components.template.BaseTemplateEngine
org.apache.struts2.components.template.BaseTemplateEngine
       org.apache.struts2.components.template.FreemarkerTemplateEngine
org.apache.struts2.components.template.FreemarkerTemplateEngine
- All Implemented Interfaces: 
- TemplateEngine
- public class FreemarkerTemplateEngine 
- extends BaseTemplateEngine
Freemarker based template engine.
 
 
 
 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
bodyContent
static Class bodyContent
freemarkerManager
private FreemarkerManager freemarkerManager
templates
private final HashMap<String,freemarker.template.Template> templates
missingTemplates
private final HashSet<String> missingTemplates
freemarkerCaching
private boolean freemarkerCaching
LOG
private static final Logger LOG
FreemarkerTemplateEngine
public FreemarkerTemplateEngine()
setFreemarkerManager
public void setFreemarkerManager(FreemarkerManager mgr)
- 
 
renderTemplate
public void renderTemplate(TemplateRenderingContext templateContext)
                    throws Exception
- Description copied from interface: TemplateEngine
- Renders the template
 
- 
- Parameters:
- templateContext- context for the given template.
- Throws:
- Exception- is thrown if there is a failure when rendering.
 
getSuffix
protected String getSuffix()
- 
- Specified by:
- getSuffixin class- BaseTemplateEngine
 
- 
 
addToMissingTemplateCache
protected void addToMissingTemplateCache(String templateName)
- 
 
isTemplateMissing
protected boolean isTemplateMissing(String templateName)
- 
 
addToCache
protected void addToCache(String templateName,
                          freemarker.template.Template template)
- 
 
findInCache
protected freemarker.template.Template findInCache(String templateName)
- 
 
setCacheTemplates
public void setCacheTemplates(String cacheTemplates)
- Enables or disables Struts caching of Freemarker templates. By default disabled.
 Set struts.freemarker.templatesCache=true to enable cache
 
- 
- Parameters:
- cacheTemplates- "true" if the template engine should cache freemarker template
 internally
 
Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.