Business user templating language for Java

190 views Asked by At

I'm looking for a secure templating language for Java that business users can use.

When I say secure I mean you can't enter in something that will take down the server or hog a thread.

Ideally I would like looping and conditions but for looping I don't want them enter an infinite loop or something like 1 to 3 billion counter.

Know of any libraries (I'm hoping to avoid having modify any of templating evaluators like Velocity)

2

There are 2 answers

0
Adam Gent On BEST ANSWER

I ended up picking Mustache. I chose the Java implementation mainly because Scalate seems to have many, many dependencies.

1
Perception On

Have you considered MVEL? It is fast, small, embeddable, and pretty easy to integrate. It allows you to setup all data to be operated on by the interpreter, which is great for security. And its syntax is expandable, so if you don't like the default's you can always come up with your own.

http://mvel.codehaus.org/