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 and Description
    --- | ---
    `protected TemplateEngineManager` | `templateEngineManager`

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

      `DEFAULT_THEME_PROPERTIES_FILE_NAME`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JavaTemplateEngine()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and 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 Detail

    - #### templateEngineManager

          protected TemplateEngineManager templateEngineManager

  - ### Constructor Detail

    - #### JavaTemplateEngine

          public JavaTemplateEngine()

  - ### Method Detail

    - #### 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

Copyright © 2000–2022 Apache Software Foundation. All rights reserved.