NamePros.Com (http://www.namepros.com/)
-   CODE (http://www.namepros.com/code/)
-   -   Tutorial: introduction to FreeMarker (http://www.namepros.com/code/455241-tutorial-introduction-to-freemarker.html)

jido 04-08-2008 05:24 PM

Tutorial: introduction to FreeMarker
 
FreeMarker is a Java template engine to generate pages from templates. This is to get a first taste of FreeMarker.

The first example starts with a template page containing:

Quote:
${pet} does ${number} little hops :)



That produces a page with the text:

Quote:
Bunny does 6 little hops :)



All the FreeMarker work is done in these 3 Java lines:

Code:
Configuration cfg = new Configuration(); Template tpl = cfg.getTemplate(template); tpl.process(datamodel, output);


http://bredelet.com/Denis/FreeMarker first steps.html
Hope that is useful to someone!


All times are GMT -7. The time now is 01:26 AM.
Site Sponsors
Advertise your business at NamePros

Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0