s:put

Output (print) a variable.

INPUT
<s:set name="x">3</s:set>
<s:put>x</s:put>
OUTPUT
3
q=""  quite=""  

By default, <put> prints #unset if variable is not set. Use q= if you like to disable this behaviour.

INPUT
<!-- assuming that y is not set -->
<s:put>y</s:put>
OUTPUT
#unset
INPUT
<!-- assuming that y is not set -->
<s:put q>y</s:put>
OUTPUT
name=""  var=""  

Instead of providing the name of the variable you want to print as the content of <put> you can use one of these attributes.

INPUT
<s:set name="x">3</s:set>
<s:put name="x" />
<s:put var="x" />
OUTPUT
3
3

Syntactic sugar for put

Since we use <put> a lot, there is a syntactic sugare for it. Which means:

Typing `<put>x</put>` is the same as typing `{{ x }}`.
Typing `<put quite>x</put>` is the same as typing `{{~ x }}`.

If you actually want to print {{ or }} just escape them like this: \{{ and \}}.