Apache Struts 2 Documentation > Home > Guides > Core Developers Guide > Result Types > FreeMarker Result
Added by casey, last edited by Ted Husted on Sep 10, 2006  (view change)

Renders a view using the Freemarker template engine.

The FreemarkarManager class configures the template loaders so that the template location can be either

  • relative to the web root folder. eg /WEB-INF/views/home.ftl
  • a classpath resuorce. eg com/company/web/views/home.ftl

Also see Freemarker Support.

Parameters

  • location (default) - the location of the template to process.
  • parse - true by default. If set to false, the location param will not be parsed for Ognl expressions.
  • contentType - defaults to "text/html" unless specified.

Examples

<result name="success" type="freemarker">foo.ftl</result>