Setting a variable string

The code below demonstrates how you to set a variable and then output it.

The $! preceding the variable name means if the variable is set.

The brackets represent where the variable begins and ends - for example you should use the brackets if you need to use the variable in a url http://www.url.co.uk/${site}/article/

  1. #set ($variableName = "Hello World!")  
  2.   
  3. $!{variableName}  
comments powered by Disqus