Basic Introduction to Velocity

Example Usage

A variable in velocity looks like this:


To set a variable:


#set ($message = "Hello")

A basic if statement:

#if ($message == "Hello")
   Message received and is "Hello"

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

Related Content

Was this page helpful?

Have a question about this article?

See questions about this article

Powered by Confluence and Scroll Viewport