Thymeleaf Explained

Thymeleaf
Developer:Daniel Fernández
Latest Release Version:3.1.1[1]
Operating System:Cross-platform
Programming Language:Java
Genre:Template Engine
Standard:XML, XHTML, HTML5
License:Apache License 2.0

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.

In web applications Thymeleaf aims to be a complete substitute for JavaServer Pages (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:[2]

Thymeleaf example

The following example produces an HTML5 table with rows for each item of a List variable called allProducts.

NamePrice
Oranges0.99

This piece of code includes:

# rh $ #numbers.formatDecimal(...)

Also, this fragment of (X)HTML code can be perfectly displayed by a browser as a prototype, without being processed at all: it is a natural template.

See also

External links

Notes and References

  1. Web site: Thymeleaf 3.1: What's new and how to migrate - Thymeleaf .
  2. Web site: Features - Thymeleaf: Java XML/XHTML/HTML5 template engine . 2011-10-16 . dead . https://web.archive.org/web/20111008055319/http://www.thymeleaf.org/features.html . 2011-10-08 . Thymeleaf Features