Skip to content

Tag: thymeleaf

Serving HTML pages in a Spring Boot application

I have a Spring Boot Application. I am trying to pass a variable to a HTML page but unfortunately I cannot seem to do it, on application start nothing is rendered except the static text: “WORLD”. My controller is as below: And my index.html: I was looking for an answer and I found these articles: …

How to send email with inline image using ThymeLeaf

I’m trying to send an email with an inline image using ThymeLeaf and Spring, but so far no success. The email sends, but the inline image won’t show in the email. The project is not web-based (not a website), but is a desktop stand-alone, not mobile This is how I get the image file: My service cla…

SpringBoot with Thymeleaf – css not found

First to say is that I’ve been searching for a solution for a while now and I’m quite desperate now. I cannot get the css file to be accessible from html page when run by Spring Boot. html.file Application.java folder structure: I’ve tried putting the css folder into a static folder and/or r…

Thymeleaf: how to get URL attribute value

I can’t find any solution for getting attribute from URL using Thymeleaf. For example, for URL: I need to get “error” attribute value. Also I’m using SpringMVC, if it could be helpful. Answer After some investigation I found that it was Spring EL issue actually. So complete answer with…