0% found this document useful (0 votes)
55 views10 pages

Introduction To Thymeleaf

Thymeleaf is a Java template engine that can be used to generate HTML, XHTML, and XML documents. It is a replacement for Java Server Pages (JSPs) and offers natural templating which allows templates to be viewed directly in browsers during development. Thymeleaf templates are valid HTML documents whereas JSP files are not valid HTML. Thymeleaf is an open source project created in 2011 by Daniel Fernandez that is no longer tied to web environments and can be used to generate HTML emails.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views10 pages

Introduction To Thymeleaf

Thymeleaf is a Java template engine that can be used to generate HTML, XHTML, and XML documents. It is a replacement for Java Server Pages (JSPs) and offers natural templating which allows templates to be viewed directly in browsers during development. Thymeleaf templates are valid HTML documents whereas JSP files are not valid HTML. Thymeleaf is an open source project created in 2011 by Daniel Fernandez that is no longer tied to web environments and can be used to generate HTML emails.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Introduction to Thymeleaf

Thyme
• Thyme (/taɪm/) is an aromatic
perennial evergreen herb with
culinary, medicinal, and
ornamental uses. (Wikipedia)

• Egyptians used thyme for


embalming.

• Greeks believed thyme was a


source of courage
Thymeleaf
• Thymeleaf is a Java Template Engine
• Open Source Project Released in 2011
• Created by Spanish Software Engineer Daniel
Fernandez
• Using Apache License 2.0 Open Source License
• Pronounced /‘taim/ - (time)
Thymeleaf Features
• Thymeleaf is a Java template engine producing XML, XHTML, and
HTML5.

• Thymeleaf is a replacement for JSPs (Java Server Pages)

• Thymeleaf is a ‘Natural’ Template Engine.

• Is not tied to web environment. (ie can be used for producing HTML
for emails)

• Thymeleaf is not a web framework


Thymeleaf vs JSP
• Thymeleaf templates are valid HTML documents you can view in the
browser.

• JSP files are not valid HTML, and look awful in the browser

• The natural templating ability allows you to perform rapid


development, without the need to run a container to parse the
template/JSP to view the product in a browser.

• Speeds development time


Thymeleaf Performance

• Thymeleaf typically does benchmark slower than other template


engines such as JSP, Freemarker, and Velocity

• Note: Spring 5 no longer supports Velocity

• Thymeleaf 3.0 did bring significant performance improvements

• Beware of old benchmark data!

You might also like