SlideShare a Scribd company logo
1 of 17
Download to read offline
Introduction to Thymeleaf
February 14, 2017
Presented by - Nakul
Introduction
Thymeleaf offers a set of Spring integrations that allow you to use it as a full-featured
substitute for JSP in Spring MVC applications.
● Make the mapped methods in your Spring MVC @Controller objects forward to
templates managed by Thymeleaf, exactly like you do with JSPs.
● Use Spring Expression Language (Spring EL) in your templates.
● Create forms in your templates that are completely integrated with your
form-backing beans and result bindings, including the use of property editors,
conversion services and validation error handling.
● Display internationalization messages from messages files managed by Spring
(through the usual MessageSource objects).
The SpringStandardDialect
In order to achieve an easier and better integration, Thymeleaf provides a dialect which specifically implements
all the needed features for it to work correctly with Spring.
● Use Spring Expression Language (Spring EL) as a variable expression language, instead of OGNL.
Consequently, all ${...} and *{...} expressions will be evaluated by Spring’s Expression Language engine.
● Access any beans in your application context using SpringEL’s syntax: ${@myBean.doSomething()}
● New attributes for form processing: th:field, th:errors and th:errorclass, besides a new implementation
of th:object that allows it to be used for form command selection.
● An expression object and method, #themes.code(...), which is equivalent to the spring:theme JSP
custom tag.
● An expression object and method, #mvc.uri(...), which is equivalent to the spring:mvcUrl(...) JSP
custom function (only in Spring 4.1+).
Continued..
Note that you shouldn’t use this dialect directly in a normal TemplateEngine object as a part of its configuration.
Instead, you should instance a new template engine class that performs all the required configuration steps:
org.thymeleaf.spring4.SpringTemplateEngine.
@Bean
public SpringTemplateEngine springTemplateEngine(TemplateResolver templateResolver) {
SpringTemplateEngine springTemplateEngine = new SpringTemplateEngine();
springTemplateEngine.addTemplateResolver(templateResolver);
return springTemplateEngine;
}
Standard Expression Syntax
● Simple expressions:
○ Variable Expressions: ${...}
○ Selection Variable Expressions: *{...}
○ Message Expressions: #{...}
○ Link URL Expressions: @{...}
● Literals
○ Text literals: 'one text', 'Another one!',…
○ Number literals: 0, 34, 3.0, 12.3,…
○ Boolean literals: true, false
○ Null literal: null
○ Literal tokens: one, sometext, main,…
● Text operations:
○ String concatenation: +
○ Literal substitutions: The name is ${name}
Standard Expression Syntax
● Arithmetic operations:
○ Binary operators: +, -, *, /, %
○ Minus sign (unary operator): -
● Boolean operations:
○ Binary operators: and, or
○ Boolean negation (unary operator): !, not
● Comparisons and equality:
○ Comparators: >, <, >=, <= (gt, lt, ge, le)
○ Equality operators: ==, != (eq, ne)
● Conditional operators:
○ If-then: (if) ? (then)
○ If-then-else: (if) ? (then) : (else)
○ Default: (value) ?: (defaultvalue)
Objects available
● #ctx: the context object.
● #vars: the context variables.
● #locale: the context locale.
● #request: (only in Web Contexts) the HttpServletRequest object.
● #response: (only in Web Contexts) the HttpServletResponse object.
● #session: (only in Web Contexts) the HttpSession object.
● #servletContext: (only in Web Contexts) the ServletContext object.
Creating Forms
Thymeleaf requires you to specify the command object by using a th:object attribute in your <form> tag:
<form action="#" th:action="@{/student/create}" th:object="${student}" method="post">
...
</form>
● Values for th:object attributes in form tags must be variable expressions (${...}) specifying only the
name of a model attribute, without property navigation. This means that an expression like
${seedStarter} is valid, but ${seedStarter.data} would not be.
● Once inside the <form> tag, no other th:object attribute can be specified. This is consistent with the
fact that HTML forms cannot be nested.
Inputs
<input type="text" th:field="*{dateCreated}" />
Is rendered as
<input type="text" id="dateCreated" name="dateCreated" th:value="*{dateCreated}" />
th:field. This is a very important feature for Spring MVC integration because it does all the heavy
work of binding your input with a property in the form-backing bean.
The th:field can be applied to various input types present in html
Displaying values from message source
The th:text=”#{key}” tag attribute can be used to display values from property files. For
this to work the property file must be configured as messageSource bean:
Here is the Thymeleaf HTML code to display the value associated with the key
welcome.message:
<span th:text="#{welcome.message}" />
Displaying model attributes
1. Simple Attributes -
The th:text=”${attributename}” tag attribute can be used to display the value of model
attributes. Let’s add a model attribute with the name serverTime in the controller class:
model.addAttribute("serverTime", dateFormat.format(new Date()));
can be accessed as
Current time is <span th:text="${serverTime}" />
Displaying model attributes
2. Collection Attributes -
model.addAttribute("studentsList", studentsList);
we can use Thymeleaf template code to iterate over the list of students and display all field values
<tbody>
<tr th:each="student: ${studentsList}">
<td th:text="${student.id}" />
<td th:text="${student.name}" />
</tr>
</tbody>
Conditional Evaluation ‘if and unless’
The th:if=”${condition}” attribute is used to display a section of the view if the condition is met. The
th:unless=”${condition}” attribute is used to display a section of the view if the condition is not met.
public class Student implements Serializable { public Character gender; }
Suppose this field has two possible values (M or F) to indicate the student’s gender.
<td>
<span th:if="${student.gender} == 'M'" th:text="Male" />
<span th:unless="${student.gender} == 'M'" th:text="Female" />
</td>
Conditional Evaluation ‘switch and case’
The th:switch and th:case attributes are used to display content conditionally using the switch
statement structure.
The previous code could be rewritten using the th:switch and th:case attributes:
<td th:switch="${student.gender}">
<span th:case="'M'" th:text="Male" />
<span th:case="'F'" th:text="Female" />
</td>
References
Using Thymeleaf
Thymeleaf Tutorial 3.0
Introduction to thymeleaf
Thymeleaf tutorial 2.1
Questions ?
Thank You

More Related Content

What's hot

What's hot (20)

Spring Boot and REST API
Spring Boot and REST APISpring Boot and REST API
Spring Boot and REST API
 
Spring Framework
Spring Framework  Spring Framework
Spring Framework
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Spring MVC
Spring MVCSpring MVC
Spring MVC
 
Spring data presentation
Spring data presentationSpring data presentation
Spring data presentation
 
Hibernate ppt
Hibernate pptHibernate ppt
Hibernate ppt
 
Spring MVC Framework
Spring MVC FrameworkSpring MVC Framework
Spring MVC Framework
 
Spring boot
Spring bootSpring boot
Spring boot
 
Introduction to Spring Boot
Introduction to Spring BootIntroduction to Spring Boot
Introduction to Spring Boot
 
Spring - Part 1 - IoC, Di and Beans
Spring - Part 1 - IoC, Di and Beans Spring - Part 1 - IoC, Di and Beans
Spring - Part 1 - IoC, Di and Beans
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
JSON: The Basics
JSON: The BasicsJSON: The Basics
JSON: The Basics
 
Java Spring
Java SpringJava Spring
Java Spring
 
Spring Boot in Action
Spring Boot in Action Spring Boot in Action
Spring Boot in Action
 
Spring Core
Spring CoreSpring Core
Spring Core
 
Introduction to React JS for beginners
Introduction to React JS for beginners Introduction to React JS for beginners
Introduction to React JS for beginners
 
Spring boot - an introduction
Spring boot - an introductionSpring boot - an introduction
Spring boot - an introduction
 
Java spring framework
Java spring frameworkJava spring framework
Java spring framework
 
Spring boot introduction
Spring boot introductionSpring boot introduction
Spring boot introduction
 
JPA For Beginner's
JPA For Beginner'sJPA For Beginner's
JPA For Beginner's
 

Viewers also liked

Viewers also liked (17)

Cosmos DB Service
Cosmos DB ServiceCosmos DB Service
Cosmos DB Service
 
JFree chart
JFree chartJFree chart
JFree chart
 
Spring Web Flow
Spring Web FlowSpring Web Flow
Spring Web Flow
 
RESTEasy
RESTEasyRESTEasy
RESTEasy
 
Introduction to gradle
Introduction to gradleIntroduction to gradle
Introduction to gradle
 
Hamcrest
HamcrestHamcrest
Hamcrest
 
Introduction to es6
Introduction to es6Introduction to es6
Introduction to es6
 
Grails with swagger
Grails with swaggerGrails with swagger
Grails with swagger
 
Unit test-using-spock in Grails
Unit test-using-spock in GrailsUnit test-using-spock in Grails
Unit test-using-spock in Grails
 
Jmh
JmhJmh
Jmh
 
Progressive Web-App (PWA)
Progressive Web-App (PWA)Progressive Web-App (PWA)
Progressive Web-App (PWA)
 
Java 8 features
Java 8 featuresJava 8 features
Java 8 features
 
Reactive java - Reactive Programming + RxJava
Reactive java - Reactive Programming + RxJavaReactive java - Reactive Programming + RxJava
Reactive java - Reactive Programming + RxJava
 
Actors model in gpars
Actors model in gparsActors model in gpars
Actors model in gpars
 
Apache tika
Apache tikaApache tika
Apache tika
 
Jsoup
JsoupJsoup
Jsoup
 
Vertx
VertxVertx
Vertx
 

Similar to Introduction to thymeleaf

3.jsp tutorial
3.jsp tutorial3.jsp tutorial
3.jsp tutorial
shiva404
 

Similar to Introduction to thymeleaf (20)

Jsplecture
JsplectureJsplecture
Jsplecture
 
Jsp lecture
Jsp lectureJsp lecture
Jsp lecture
 
Angular 2 Essential Training
Angular 2 Essential Training Angular 2 Essential Training
Angular 2 Essential Training
 
Introduction to JSP.pptx
Introduction to JSP.pptxIntroduction to JSP.pptx
Introduction to JSP.pptx
 
3.jsp tutorial
3.jsp tutorial3.jsp tutorial
3.jsp tutorial
 
JSP AND XML USING JAVA WITH GET AND POST METHODS
JSP AND XML USING JAVA WITH GET AND POST METHODSJSP AND XML USING JAVA WITH GET AND POST METHODS
JSP AND XML USING JAVA WITH GET AND POST METHODS
 
Jazz
JazzJazz
Jazz
 
Javascript
JavascriptJavascript
Javascript
 
Java script tutorial
Java script tutorialJava script tutorial
Java script tutorial
 
Jsp
JspJsp
Jsp
 
Java Server Pages
Java Server PagesJava Server Pages
Java Server Pages
 
Template rendering in rails
Template rendering in rails Template rendering in rails
Template rendering in rails
 
68837.ppt
68837.ppt68837.ppt
68837.ppt
 
JSP - Java Server Page
JSP - Java Server PageJSP - Java Server Page
JSP - Java Server Page
 
Asp.net mvc training
Asp.net mvc trainingAsp.net mvc training
Asp.net mvc training
 
JSP
JSPJSP
JSP
 
JSP- JAVA SERVER PAGES
JSP- JAVA SERVER PAGESJSP- JAVA SERVER PAGES
JSP- JAVA SERVER PAGES
 
Typescript language extension of java script
Typescript language extension of java scriptTypescript language extension of java script
Typescript language extension of java script
 
Jsp
JspJsp
Jsp
 
Jsp
JspJsp
Jsp
 

More from NexThoughts Technologies

More from NexThoughts Technologies (20)

Alexa skill
Alexa skillAlexa skill
Alexa skill
 
GraalVM
GraalVMGraalVM
GraalVM
 
Docker & kubernetes
Docker & kubernetesDocker & kubernetes
Docker & kubernetes
 
Apache commons
Apache commonsApache commons
Apache commons
 
HazelCast
HazelCastHazelCast
HazelCast
 
MySQL Pro
MySQL ProMySQL Pro
MySQL Pro
 
Microservice Architecture using Spring Boot with React & Redux
Microservice Architecture using Spring Boot with React & ReduxMicroservice Architecture using Spring Boot with React & Redux
Microservice Architecture using Spring Boot with React & Redux
 
Swagger
SwaggerSwagger
Swagger
 
Solid Principles
Solid PrinciplesSolid Principles
Solid Principles
 
Arango DB
Arango DBArango DB
Arango DB
 
Jython
JythonJython
Jython
 
Introduction to TypeScript
Introduction to TypeScriptIntroduction to TypeScript
Introduction to TypeScript
 
Smart Contract samples
Smart Contract samplesSmart Contract samples
Smart Contract samples
 
My Doc of geth
My Doc of gethMy Doc of geth
My Doc of geth
 
Geth important commands
Geth important commandsGeth important commands
Geth important commands
 
Ethereum genesis
Ethereum genesisEthereum genesis
Ethereum genesis
 
Ethereum
EthereumEthereum
Ethereum
 
Springboot Microservices
Springboot MicroservicesSpringboot Microservices
Springboot Microservices
 
An Introduction to Redux
An Introduction to ReduxAn Introduction to Redux
An Introduction to Redux
 
Google authentication
Google authenticationGoogle authentication
Google authentication
 

Recently uploaded

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Recently uploaded (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 

Introduction to thymeleaf

  • 1. Introduction to Thymeleaf February 14, 2017 Presented by - Nakul
  • 2. Introduction Thymeleaf offers a set of Spring integrations that allow you to use it as a full-featured substitute for JSP in Spring MVC applications. ● Make the mapped methods in your Spring MVC @Controller objects forward to templates managed by Thymeleaf, exactly like you do with JSPs. ● Use Spring Expression Language (Spring EL) in your templates. ● Create forms in your templates that are completely integrated with your form-backing beans and result bindings, including the use of property editors, conversion services and validation error handling. ● Display internationalization messages from messages files managed by Spring (through the usual MessageSource objects).
  • 3. The SpringStandardDialect In order to achieve an easier and better integration, Thymeleaf provides a dialect which specifically implements all the needed features for it to work correctly with Spring. ● Use Spring Expression Language (Spring EL) as a variable expression language, instead of OGNL. Consequently, all ${...} and *{...} expressions will be evaluated by Spring’s Expression Language engine. ● Access any beans in your application context using SpringEL’s syntax: ${@myBean.doSomething()} ● New attributes for form processing: th:field, th:errors and th:errorclass, besides a new implementation of th:object that allows it to be used for form command selection. ● An expression object and method, #themes.code(...), which is equivalent to the spring:theme JSP custom tag. ● An expression object and method, #mvc.uri(...), which is equivalent to the spring:mvcUrl(...) JSP custom function (only in Spring 4.1+).
  • 4. Continued.. Note that you shouldn’t use this dialect directly in a normal TemplateEngine object as a part of its configuration. Instead, you should instance a new template engine class that performs all the required configuration steps: org.thymeleaf.spring4.SpringTemplateEngine. @Bean public SpringTemplateEngine springTemplateEngine(TemplateResolver templateResolver) { SpringTemplateEngine springTemplateEngine = new SpringTemplateEngine(); springTemplateEngine.addTemplateResolver(templateResolver); return springTemplateEngine; }
  • 5. Standard Expression Syntax ● Simple expressions: ○ Variable Expressions: ${...} ○ Selection Variable Expressions: *{...} ○ Message Expressions: #{...} ○ Link URL Expressions: @{...} ● Literals ○ Text literals: 'one text', 'Another one!',… ○ Number literals: 0, 34, 3.0, 12.3,… ○ Boolean literals: true, false ○ Null literal: null ○ Literal tokens: one, sometext, main,… ● Text operations: ○ String concatenation: + ○ Literal substitutions: The name is ${name}
  • 6. Standard Expression Syntax ● Arithmetic operations: ○ Binary operators: +, -, *, /, % ○ Minus sign (unary operator): - ● Boolean operations: ○ Binary operators: and, or ○ Boolean negation (unary operator): !, not ● Comparisons and equality: ○ Comparators: >, <, >=, <= (gt, lt, ge, le) ○ Equality operators: ==, != (eq, ne) ● Conditional operators: ○ If-then: (if) ? (then) ○ If-then-else: (if) ? (then) : (else) ○ Default: (value) ?: (defaultvalue)
  • 7. Objects available ● #ctx: the context object. ● #vars: the context variables. ● #locale: the context locale. ● #request: (only in Web Contexts) the HttpServletRequest object. ● #response: (only in Web Contexts) the HttpServletResponse object. ● #session: (only in Web Contexts) the HttpSession object. ● #servletContext: (only in Web Contexts) the ServletContext object.
  • 8. Creating Forms Thymeleaf requires you to specify the command object by using a th:object attribute in your <form> tag: <form action="#" th:action="@{/student/create}" th:object="${student}" method="post"> ... </form> ● Values for th:object attributes in form tags must be variable expressions (${...}) specifying only the name of a model attribute, without property navigation. This means that an expression like ${seedStarter} is valid, but ${seedStarter.data} would not be. ● Once inside the <form> tag, no other th:object attribute can be specified. This is consistent with the fact that HTML forms cannot be nested.
  • 9. Inputs <input type="text" th:field="*{dateCreated}" /> Is rendered as <input type="text" id="dateCreated" name="dateCreated" th:value="*{dateCreated}" /> th:field. This is a very important feature for Spring MVC integration because it does all the heavy work of binding your input with a property in the form-backing bean. The th:field can be applied to various input types present in html
  • 10. Displaying values from message source The th:text=”#{key}” tag attribute can be used to display values from property files. For this to work the property file must be configured as messageSource bean: Here is the Thymeleaf HTML code to display the value associated with the key welcome.message: <span th:text="#{welcome.message}" />
  • 11. Displaying model attributes 1. Simple Attributes - The th:text=”${attributename}” tag attribute can be used to display the value of model attributes. Let’s add a model attribute with the name serverTime in the controller class: model.addAttribute("serverTime", dateFormat.format(new Date())); can be accessed as Current time is <span th:text="${serverTime}" />
  • 12. Displaying model attributes 2. Collection Attributes - model.addAttribute("studentsList", studentsList); we can use Thymeleaf template code to iterate over the list of students and display all field values <tbody> <tr th:each="student: ${studentsList}"> <td th:text="${student.id}" /> <td th:text="${student.name}" /> </tr> </tbody>
  • 13. Conditional Evaluation ‘if and unless’ The th:if=”${condition}” attribute is used to display a section of the view if the condition is met. The th:unless=”${condition}” attribute is used to display a section of the view if the condition is not met. public class Student implements Serializable { public Character gender; } Suppose this field has two possible values (M or F) to indicate the student’s gender. <td> <span th:if="${student.gender} == 'M'" th:text="Male" /> <span th:unless="${student.gender} == 'M'" th:text="Female" /> </td>
  • 14. Conditional Evaluation ‘switch and case’ The th:switch and th:case attributes are used to display content conditionally using the switch statement structure. The previous code could be rewritten using the th:switch and th:case attributes: <td th:switch="${student.gender}"> <span th:case="'M'" th:text="Male" /> <span th:case="'F'" th:text="Female" /> </td>
  • 15. References Using Thymeleaf Thymeleaf Tutorial 3.0 Introduction to thymeleaf Thymeleaf tutorial 2.1