I would like to display the name of a user using thymeleaf. Here is the html tag that I'm using:
<h1 th:text="${username}"></h1> I want it to display this: Hello, User
Given username is a string "User". I tried something like this:
<h1 th:text="${username}">Hello, </h1> But it didn't work. How can I fix it?
<h1 th:text="|Hello, ${username}|"></h1>or<h1 th:text="'Hello, ' + ${username}"></h1>