Chunk Templates, a template engine for Java
Full documentation at http://www.x5software.com/chunk/
Chunk is a Java Template Engine for applications that serve HTML or XML. It’s the little engine that can handle any templating job, plain text, markup, markdown, whatever, wherever.
Chunk is compact and speedy, easy to learn yet very powerful.
Chunk templates provide a rich featureset: in-tag filters, in-tag default values, includes, looping and branching, defining multiple snippets per template file, layered themes, macros, and much much more.
Free to use, copyright waived. MIT License.
Browse the fabulous documentation chock full of examples and recipes.
Download the latest chunk-template jar. Works with Java 1.5 and up.
Available from Maven Central:
<dependency>
<groupId>com.x5dev</groupId>
<artifactId>chunk-templates</artifactId>
<version>3.6.2</version>
</dependency>
<AngleBrackets>
(and your xml/html can still validate).An Eclipse plugin provides syntax highlighting, outline navigation pane for snippets in .chtml files, and auto-hyperlinks of snippet references. Requires Eclipse Helios (3.6) or better. Get the plugin.
Most features work fully with the standalone jar. A couple advanced features can be unlocked by adding these libraries to the classpath:
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.12.2</version>
</dependency>
<dependency>
<groupId>org.cheffo</groupId>
<artifactId>jeplite</artifactId>
<version>0.8.7a</version>
</dependency>
Note: on Android (optional) - to make use of chunk.setToBean(“tag”,bean) binding, just make sure to include this additional dependency in your project:
<dependency>
<groupId>com.madrobot</groupId>
<artifactId>madrobotbeans</artifactId>
<version>0.1</version>
</dependency>
Or download madrobotbeans-0.1.jar directly. Thanks to Elton Kent and the Mad Robot project.