Search code examples
javavelocityfreemarkervtleclipse-jet

Is there a JSP like Java based Web template engine that can load page templates from persistent storage?


I would like to provide users to write plugins to my application, the initial design and implementaion involve a Velocity (VTL) template engine to allow

  • Secure: uesrs can't call internall Java code (without hacking using reflection)
  • Simple: Limited and confined API, I can write my own domain specific language
  • Portable: I can store VTL templates in a JAR, in the database or anywhere I like
  • Decoupled: template context and logic / controller is not coupled to the web / HTML

Then with the limitations of VTL (no tag library support as first) we looked at Freemarker

It has all the advantages, but I wonder if this is as good as it gets

The other alternatives are eclipse JET, and I don't know of anything else at the moment

I would like a solution that can have Java content assist (like JSP) but that can be saved in the database

Is there something like this out there? (Besides JET, and JBoss's Freemarker buggy plugin)


Solution

  • Check out Thymeleaf.

    I haven't used it.. YET!

    It appears the developer designed it to address the shortcomings of Velocity and FreeMaker.