Skip to content
Advertisement

Tag: thymeleaf

Cannot open index page in Thymeleaf, getting 404 in Intellij IDEA

I’ve created simple demo for Spring boot and Thymeleaf, but I cannot open index page. Controller code: Having index template in /src/main/resources/templates/index.html Having application.properties: server.port=9095 And going to the address http://localhost:9095/ And getting error: Spring boot class is: and pom.xml contains spring-boot-starter-thymeleaf and spring-boot-starter-web. Answer As described in following answer, Intellij IDEA had outdated dependencies, so helped buttons Reload all

How to create a list of clickable items using Thymeleaf

In my Spring Boot web app, I need to create a list of items using Thymeleaf where clicking and submitting an item sends its value to my controller, which looks like this: Note the controller takes an item parameter. For comparison, this following Thymeleaf dropdown list performs as expected in that when I select an item from the dropdown, then

Template might not exists

Im trying to call restapi and im getting error org.thymeleaf.exceptions.TemplateInputException: Error resolving template [view-fields], template might not exist or might not be accessible by any of the configured Template Resolvers at org.thymeleaf.engine.TemplateManager.resolveTemplate(TemplateManager.java:869) ~[thymeleaf-3.0.12.RELEASE.jar:3.0.12.RELEASE] at org.thymeleaf.engine.TemplateManager.parseAndProcess(TemplateManager.java:607) ~[thymeleaf-3.0.12.RELEASE.jar:3.0.12.RELEASE] at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1098) ~[thymeleaf-3.0.12.RELEASE.jar:3.0.12.RELEASE] at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1072) ~[thymeleaf-3.0.12.RELEASE.jar:3.0.12.RELEASE] at org.thymeleaf.spring5.view.ThymeleafView.renderFragment(ThymeleafView.java:366) ~[thymeleaf-spring5-3.0.12.RELEASE.jar:3.0.12.RELEASE] at org.thymeleaf.spring5.view.ThymeleafView.render(ThymeleafView.java:190) ~[thymeleaf-spring5-3.0.12.RELEASE.jar:3.0.12.RELEASE] at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1400) ~ etc properties Maybe this would help Answer According to

SpringMVC with Bootstrap and Thymeleaf pages decoration

I am working in: “SpringMVC 5”, with “Twitter Bootstrap 4” html pages, and “Thymeleaf 3” templating, in IntelliJ EAP (latest version) and Tomcat9, Maven The structure of my project: I am using these tutorials: https://www.baeldung.com/spring-thymeleaf-fragments https://www.thymeleaf.org/doc/tutorials/3.0/usingthymeleaf.html#template-layout I have my page (home.html). I have my template (template.html). According to the 2nd tutorial: I inserted the “menubar” into the “template” (this insert

Thymeleaf fragment processor and Spring 5

Could somebody, please, help with Thymeleaf? I need to create a template layout and I’ve got stuck with <div th:fragment=”content”></div>. The point is layout:fragment doesn’t replace code on the dashboard page. By the way, other processors like layout:decorate or th:replace works well. I’m using Intellij IDEA with Spring 2.5.4. My template structure #dashboard.html #template.html #pom.xml #Thymeleaf.class Result of Dashboard page

Recieve a Map from a HTML form with Thymeleaf

I’m working on a project with Spring Web and Thymeleaf (this is my first time using Thymeleaf) and I have this requirement: The user needs to see a single form to fill a table with 32 rows and 4 columns, all at once. Edit. Each row has a fixed key (just for clarification) My first (naive) approach was to make

Populating inner table inside another table with Thymeleaf

I have DTO class: With getters, setters and toString for every field. I’m creating this table for shift schedule calendar: My Thymeleaf: The idea behind this: CalendarNode.date generates row for parent table, for each date. That works fine. Inside every row, in a cell I have second table that should show list of employees who works on that date in

Advertisement