running freemarker template from java?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

running freemarker template from java?

antilles77
Is there a way to programmatically run a freemarker template against some data for instance an array or list in java and generate an html file that I can then decide to display or store somewhere?

Is there some kind of command line freemarker tool?

for example:

java -freej freemarkertemplate.ftl  somearray > result.html

?? something like that?
Reply | Threaded
Open this post in threaded view
|

Re: running freemarker template from java?

Daniel Dekany
Friday, June 11, 2010, 10:24:56 AM, antilles77 wrote:

> Is there a way to programmatically run a freemarker template against some
> data for instance an array or list in java and generate an html file that I
> can then decide to display or store somewhere?

That basically the only think plain FreeMarker can do... it's just
programming library, not something like JSP. See:
http://freemarker.org/docs/pgui.html

> Is there some kind of command line freemarker tool?

Yes, FMPP: http://fmpp.sourceforge.net/

However, It's somewhat specialized on certain kind of jobs, so there
is a chance it won't fit what you want to do. In that case it's easy
to write a basic command-line tools with FreeMarker.

> for example:
>
> java -freej freemarkertemplate.ftl  somearray > result.html
>
> ?? something like that?

--
Best regards,
 Daniel Dekany


------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
FreeMarker-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/freemarker-devel