Examples of applying Velocity escaping rules for file templates:
- To use a $SINGLE_VARIABLE_IDENTIFIER_WITH_NO_DOTS, prepend it with a backslash: \$SINGLE_VARIABLE_IDENTIFIER_WITH_NO_DOTS
-
To use a #SINGLE_DIRECTIVE_WITH_SINGLE_SCRIPT_ELEMENT, prepend it with a backslash:
\#SINGLE_DIRECTIVE_WITH_SINGLE_SCRIPT_ELEMENT.
Note
For details on escaping directives with multiple script elements inside, see Velocity guide
.
- To use a $SINGLE.VARIABLE.IDENTIFIER.WITH.DOTS no backslash is required. The engine will not treat such expression as a variable to be processed because a Velocity variable cannot contain dots according to the Velocity variable notation.
- To use some version control keywords (such as $Revision$, $Date$, etc.) in your default class template, prepend them with a backslash: \$Revision$.
