Fast template engine for Java. This is a port of Perl5's popular template engine named Template-Toolkit 2.
In development.
But most of features are implemented.
API may change without notice.
This project respects semantic versioning.
- VM has TemplateLoader
We need ER Diagram.
left terms and list operators (leftward)
left .
right !
left * / %
left + - _
nonassoc named unary operators
nonassoc < > <= >=
nonassoc == !=
left &&
left ||
nonassoc ..
right ?:
right =
left AND
left OR
- We need casting operator.
- 3 < 3.14 does not works correctly.
- Because these values are not comparable.
java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Double
[% FOR x IN [1..10] %]
does not works.- Because you don't need to wrap by brackets.
- I can't understand why TT2 needs brackets.
- In JTT, you need to write this code as
[% FOR x IN 1..10 %]
. - VMethod is not supported. Because Java objects have own built-in methods.
You can cache the compilation result.
JTT's parser/compiler is slow. If you are using JTT in the web application, I recommend to use caching feature.
You can use JCS for caching(I will provide jtt-jcs package after few months...(maybe)).
You can do it with INCLUDE or JavaScript.
How do I parse casting operator?