FMPP is a text file preprocessor that uses FreeMarker templates to provide macros, flow control, and expressions. It uses recursive directory processing, so it can generate complete homepages (a tree of HTML files and images). It is extendable in Java to display data from any data source (such as a database). It is usable with a command-line interface, as an Ant-task, or embedded into a Java application.
FreeMarker is a template engine that was originally designed so that servlet-based applications could keep graphical design separate from application logic. The templates provide an easy and highly flexible way to generate any kind of text output (HTML, PostScript, TeX, source code, etc.) from a variety of data sources such as Java objects, Jython objects, XML object models, and more.