I am using freemarker 2.3.x. It is expected that not all variables are defined. And it is needed to be output as it is. For example, the template is
${a}
${b}
And the data model is a=name
. Then the output is expected to be
name
${b}
By using TemplateExceptionHandler.IGNORE_HANDLER
, the output will not contain ${b}
For now I am adding a new entry b=${b}
to data model. It works but it is kind of ugly workaround. And I need to know exactly how many undefined variable will there be which is a limitation.
Is there a setting or a way to do that?