liveBook · Manning

Thymeleaf

Thymeleaf is a Java server-side template engine for generating HTML, markup, and other text-based documents from templates and model data.

How 2 Manning books explain it

Spring in Action, Sixth Edition

Thymeleaf is a server-side Java template engine for generating dynamic HTML and other text-based views.

How it is used
Renders Spring MVC views from controller-selected templates in a web application.
How deep it goes
Explains view resolution, model-to-request-attribute transfer, and template attributes through working examples.
Examples
Uses a home page with a logo and a taco design form with repeated ingredient checkboxes.
What you can do after
Apply Thymeleaf with Spring MVC to render controller-selected templates, display request data, and repeat form elements.

Read how Spring in Action, Sixth Edition explains Thymeleaf →

Spring Start Here, Second Edition

Thymeleaf is a Java server-side template engine for processing HTML and other markup templates with application data.

How it is used
Connects Spring controller data to an HTML view that can display different content for different requests.
How deep it goes
Demonstrates a starter dependency, Model attributes, and template expressions in a small example.
Examples
Uses a username and color in a greeting, and a shopping cart whose displayed product list changes.
What you can do after
Build a dynamic HTML view by passing controller data through a Model and displaying it in a Thymeleaf template.

Read how Spring Start Here, Second Edition explains Thymeleaf →

Related concepts

Questions about Thymeleaf

What is Thymeleaf?

Thymeleaf is a Java server-side template engine for generating HTML, markup, and other text-based documents from templates and model data.

Which Manning books explain Thymeleaf?

Spring in Action, Sixth Edition and Spring Start Here, Second Edition.

What is the difference between Thymeleaf and mustache?

Thymeleaf is a Java server-side template engine for generating HTML, markup, and other text-based documents from templates and model data. Mustache is a logic-less templating system that renders text by expanding tags and sections with supplied data.

What is Thymeleaf a kind of?

Thymeleaf is a kind of template engine. A template engine is software that combines reusable templates with data and rules to generate rendered output such as text, documents, or user-interface views.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.