Why Thymeleaf is a natural template

We have seen the processors of standard dialect are placed as an attribute of HTML element. Because of this arrangement, the browser can render the Thymeleaf template as a correct HTML file, even before they are processed by the template engine.

This is quite possibly because the browser simply ignores them, considering them custom attributes, so there is no issue in displaying them. The same cannot be possible in the case of JSP. For example, the JSP with the following tag is not rendered in the browser:

<form:input name="name" path=”name”/>

And if you write it with Thymeleaf, it will be as follows:

<input type="text" name="name" value="Nilang" th:value="${name}" />

The browser will display the preceding ...

Get Spring 5.0 Projects now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.