Cross Java and Javascript Template Language?

There seem to be a lot of template languages for both Java (e.g. JSP, JSTL, Freemarker, Velocity, ...) and for Javascript (e.g. Mustache, Ext's XTemplate, Jquery templates, ...) but is there one which have an implementation for both?

Ideally I'd like to be able to have an template which can be evaluated either on the server or on the client side without too much hassle switching over.



Google Closure/Soy templates.

The Wikipedia Page for Web Templating Languages reveals another one: Casper.

Both these solutions don't use a common template file which is directly evaluated in JS or Java. The template must first be compiled into an intermediate JS before evaluation on the client. (For Closure, this is fairly easy to do with ant and an included SoyToJsSrcCompiler.jar command line tool. Not sure about with Casper.)

EDIT: Another possibility is Mustache, which does not require templates to be compiled.


Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.