Skip to content

Tag: thymeleaf

How to use explicit links with Thymeleaf?

I wanted to make and link to external site in Spring+Thymeleaf web application and inserted link like this: <a th:href=”@{https://example.com}”>Link</a> However by clicking the link it tries to point internal location http://localhost/service/https://example.com not external website ht…

How to refer to a static method in Thymeleaf html in java?

I need to use the getMoneyIntoWords() method in the invoice html. But I am getting errors. Refer the code and errors below // Added below method in MoneyUtil.java Error: Answer You need special syntax to call a static method in Thymeleaf: You will need to use the full qualified name of the MoneyUtil class.