views:

126

answers:

2

I'm looking for the templates engine for Java with syntax like in Django templates or Twig (PHP). Is it exists?

Update: The target is to have same templates files for different languages.

File index.tpl {{head}} {{ var|escape }} {{body}}

can be rendered from python (Django) code as well as from PHP, using Twig. I'm looking for Java solution.

Any other templates system available in Java, PHP and python is suitable.

Thanks.

A: 

Is the objective to separate presntation details from specific data items?

If so, then Java Server Pages may be what you need.

djna
Sorry guys you're totally missing the point! It's about having the same syntax as in Django tamplates! You can have that in PHP with Twig templates and in Ruby with Liquid templates.
gnrfan
+1  A: 

Sure, there are all sorts of template engines for Java. I've used FreeMarker, Velocity and StringTemplate. I'm not sure what you mean by Django-like syntax; each engine has it's own variations on a templating approach.

For a comparison of some different engines check out here.

Jeff