FreeMarker Reminders

A small post to aggregate notes related to FreeMarker.

Accessing Parameter Inside A Directive
The following piece of code:

<#assign myVar = ${myValue}-1>

will trigger the following exception:

Exception in thread "main" freemarker.core.ParseException:
Encountered "{" …

One should not use ${…} inside a FreeMarker directive, but rather:

<#assign myVar = myValue – 1 >


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *