views:

21

answers:

0

I would like to generate email inside a Struts2 application, using Freemarker. As I am also using Freemarker for my view, I would like to "reuse" the same config.

There is already a similar question for doing the same thing with Spring. http://stackoverflow.com/questions/230763/getting-template-text-from-freemarker-in-spring-app

I am not sure where to start.

I am looking at the code of org.apache.struts2.components.template.FreemarkerTemplateEngine. Should I replicate it ? or simply call it ? I am unclear on how to get back the rendered text.