Developer(s) Daniel Fernández | Development status Active Operating system | |
Stable release 3.0.2 / September 28, 2016 (2016-09-28) |
Thymeleaf is a Java XML/XHTML/HTML5 template engine that can work both in web (Servlet-based) and non-web environments. It is better suited for serving XHTML/HTML5 at the view layer of MVC-based web applications, but it can process any XML file even in offline environments. It provides full Spring Framework integration.
Contents
In web applications Thymeleaf aims to be a complete substitute for JSP, and implements the concept of Natural Templates: template files that can be directly opened in browsers and that still display correctly as web pages.
Thymeleaf is Open-Source Software, licensed under the Apache License 2.0.
Features
From the project's website:
Thymeleaf example
The following example produces an HTML5 table with rows for each item of a List<Product> variable called all Products.
This piece of code includes:
Also, this fragment of (X)HTML code can be perfectly displayed by a browser as a prototype, without being executed at all: it is a natural template.