Velocity, FreeMarker, and Rhythm

Velocity uses references to pass dynamic content into web pages. Macros and variables are a few of these references types used to reference objects defined within the Java code or can receive values inside the web page through a VTL declaration. Setting and using objects uses the # character:

#set ($firstName = "Jimmy") 
#set ($lastName = "Gimme") 
#set ($age = 35) 
$firstName $lastName $age

FreeMarker Templating Language (FTL) can define expressions, functions, and macros within the templates and can use a rich library with predefined directives that give us the possibility to iterate data collections, include other templates, and much more. Setting a variable in FTL uses the # symbol:

<#assign firstName = "Jimmy" ...

Get Spring MVC Blueprints now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.