Last updatedMay 6, 2019

Basic introduction to Velocity

Example Usage

A variable in velocity looks like this:

1
$foo 

To set a variable:

1
#set ($message = "Hello")

A basic if statement:

1
2
3
#if ($message == "Hello")
   Message received and is "Hello"
#end 

A velocity variable which evaluates to null will simply render as the variable name. See the Velocity User's Guide