Package org.apache.struts2.views.java

# Class JavaTemplateEngine

java.lang.Object
org.apache.struts2.components.template.BaseTemplateEngine
org.apache.struts2.views.java.JavaTemplateEngine

All Implemented Interfaces:
  `TemplateEngine`

public class JavaTemplateEngine extends BaseTemplateEngine
Template engine that renders tags using java implementations

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected TemplateEngineManager`
  `templateEngineManager`

  ### Fields inherited from class org.apache.struts2.components.template.BaseTemplateEngine

  `DEFAULT_THEME_PROPERTIES_FILE_NAME`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `JavaTemplateEngine()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected String`
  `getSuffix()`
  `void`
  `renderTemplate(TemplateRenderingContext templateContext)`
  `void`
  `setDefaultTemplateType(String defaultTemplateTheme)`
  Allows for providing an alternative default struts theme.
  `void`
  `setTemplateEngineManager(TemplateEngineManager mgr)`
  `void`
  `setThemeClasses(String themeClasses)`
  Allows for providing custom theme classes (implementations of the org.apache.struts2.views.java.Theme) interface for custom rendering of tags using the javatemplates engine

  ### Methods inherited from class org.apache.struts2.components.template.BaseTemplateEngine

  `getFinalTemplateName, getThemePropertiesFileName, getThemeProps`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### templateEngineManager

    protected TemplateEngineManager templateEngineManager

- ## Constructor Details

  - ### JavaTemplateEngine

    public JavaTemplateEngine()

- ## Method Details

  - ### setTemplateEngineManager

    public void setTemplateEngineManager(TemplateEngineManager mgr)

  - ### getSuffix

    protected String getSuffix()
    Specified by:
      `getSuffix` in class `BaseTemplateEngine`

  - ### renderTemplate

    public void renderTemplate(TemplateRenderingContext templateContext) throws Exception
    Throws:
      `Exception`

  - ### setThemeClasses

    public void setThemeClasses(String themeClasses)
    Allows for providing custom theme classes (implementations of the org.apache.struts2.views.java.Theme) interface for custom rendering of tags using the javatemplates engine
    Parameters:
      `themeClasses` - a comma delimited list of custom theme class names

  - ### setDefaultTemplateType

    public void setDefaultTemplateType(String defaultTemplateTheme)
    Allows for providing an alternative default struts theme. Will default to "ftl" otherwise.
    Parameters:
      `defaultTemplateTheme` - the struts default theme