Save This Page
Home » struts-2.1.8.1-src » org.apache » struts2 » components » template » [javadoc | source]
org.apache.struts2.components.template
public class: TemplateEngineManager [javadoc | source]
java.lang.Object
   org.apache.struts2.components.template.TemplateEngineManager
The TemplateEngineManager will return a template engine for the template
Nested Class Summary:
interface  TemplateEngineManager.EngineFactory  Abstracts loading of the template engine 
class  TemplateEngineManager.LazyEngineFactory  Allows the template engine to be loaded at request time, so that engines that are missing dependencies aren't accessed if never used. 
Field Summary
public static final  String DEFAULT_TEMPLATE_TYPE_CONFIG_KEY     
public static final  String DEFAULT_TEMPLATE_TYPE    The default template extenstion is ftl
 Map<String, EngineFactory> templateEngines     
 Container container     
 String defaultTemplateType     
Method from org.apache.struts2.components.template.TemplateEngineManager Summary:
getTemplateEngine,   registerTemplateEngine,   setContainer,   setDefaultTemplateType
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.struts2.components.template.TemplateEngineManager Detail:
 public TemplateEngine getTemplateEngine(Template template,
    String templateTypeOverride) 
    Gets the TemplateEngine for the template name. If the template name has an extension (for instance foo.jsp), then this extension will be used to look up the appropriate TemplateEngine. If it does not have an extension, it will look for a Configuration setting "struts.ui.templateSuffix" for the extension, and if that is not set, it will fall back to "ftl" as the default.
 public  void registerTemplateEngine(String templateExtension,
    TemplateEngine templateEngine) 
    Registers the given template engine.

    Will add the engine to the existing list of known engines.

 public  void setContainer(Container container) 
 public  void setDefaultTemplateType(String type)