instagram

Apache Velocity Part 3 – #Set

This tutorial is about #set element in velocity template.

Please click this link for Velocity Dependency & Introduction.

#set element is being used by developer to create new variable directly in velocity template.

Find below Syntax:

#set($i = 0)
#set($name = "omtlab")
#set($count = 10.12)

Find below template for this example :

set.vm

Example Code :

Output :

Share