concept FreeMarker in category java

This is an excerpt from Manning's book Struts 2 in Action.
If you look back to figure 1.3, you can see that the action is responsible for choosing which result will render the response. The action can choose from any number of results. Common choices are between results that represent the semantic outcomes of the action’s processing, such as “success” and “error.” Struts 2 provides out-of-the-box support for using most common view-layer technologies as results. These include JSP, Velocity, FreeMarker, and XSLT. Better yet, the clean structure of the architecture ensures that more result types can be built to handle new types of responses.
In order to make sure you know what they are and how they work, we start by building a custom result that demonstrates a technique for developing Ajax applications on the Struts 2 platform. Seeing how the framework can easily be adapted to return nontraditional results, such as those required by Ajax clients, serves as a perfect demonstration of the flexibility of the result component. It both teaches you the internals of results and gives you an example of Struts 2 Ajax development. After that, we go on to tour the built-in results that the framework provides for your convenience. These include the default result that supports JSP pages, as well as alternative page-rendering options such as Velocity or FreeMarker templates.
Listing 8.6. Using FreeMarker templates to reimplement the ViewPortfolio action
<html> <head> <title>Viewing Portfolio</title> </head> <body> <h5> This is the <@s.property value="portfolioName" /> portfolio of the artist currently known as <@s.property value="username" /> </h5> <a href="<@s.url action='PortfolioHomePage'/>">Home</a> </body> </html>