I need to access a value of a Velocity template's variable named:
Mind the dot within the name. It is defined in the code as:
The problem is that, when I want to get the value of that variable withing html context with the following expression:
it is not resolved and just gives:
I tried to escape the dot with \ or change apostrophes to " but without luck.
Changing the name of the variable to a one without a dot is not an easy option for various reasons, so please suggest any other solutions.
The answer is as simple as:
Velocity variable naming: does not allow dots within variable
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.