How to create multiple files based on one Freemarker Template

I’m having a little bit trouble with freemarker right now. What I want to do basically in my template: iterate over a list of elements and create for each element a new file.

<#assign x=3>
<#list 1..x as i>
  ${i}
...create a new file with the output of this loop iteration...
</#list>

I did not find anything about this in the freemarker manual or google. Is there a way to do this?


Source: java

Leave a Reply