9,281 questions
0
votes
0
answers
140
views
Populating a dropdown with a list using Thymeleaf and Spring
I'm trying to populate a dropdown of patient names from a list of strings within my controller. For some reason the dropdown is blank. I've read through several other articles that are similar to my ...
0
votes
1
answer
116
views
Sending data to Thymeleaf (HTML) from Spring-Boot MVC (Java), Not being displayed
I am trying to put a front end on some Java code, I have added a Spring Controller Class. The only code that matters is the viewHomePage method. The Employee Class and allemplist attribute, both ...
1
vote
1
answer
59
views
Spring Boot application (Thymeleaf) with password protection for some URLs and public access for some others
I'm working on a Spring Boot application packaged as JAR, with Thymeleaf templates too. I have these URLs:
/app/endpoint : REST API with several request mappings with JSON output.
/app/login : ...
Advice
8
votes
5
replies
1k
views
Is Thymeleaf still maintained, and is there a Thymeleaf version compatible with Spring Boot 4 / Spring Framework 7?
Spring Boot 4.0 and Spring Framework 7.0 were recently released, and I’m considering upgrading my project.
However, my application uses Thymeleaf, specifically the thymeleaf-spring6 integration module,...
1
vote
1
answer
98
views
spring boot web polish characters encoding problem
In Spring Boot 2.6.0 java 8 application configuration class has content:
@Configuration
public class Internationalization implements WebMvcConfigurer {
// localeResolver, localeChangeInterceptor,...
2
votes
1
answer
115
views
Login infinitely retrying with bad credentials
I am using Java Spring boot and Thymeleaf. When trying to login with bad credentials, the page freezes for a few minutes, and it says the page isn't working.
When I activate debug in application....
1
vote
0
answers
144
views
Spring Boot's strange warnings in STS for Eclipse
Foreword: I have been looking for a possible solution for many days, finding nothing really similar to my problem.
I am reading Craig Walls's book "Spring in Action" (6th edition) to resume ...
3
votes
0
answers
90
views
Thymeleaf removes name value for select when rendering fragment
I want to build a web page that will have HTML form with a number of select components describing location: country, state, city and street. Choosing value in given select component will update ...
2
votes
1
answer
230
views
RequestDispatcher forward(request,response) works in Tomcat 10 but not in Tomcat 11
I'm in the process of doing a technology upgrade for a Spring mvc app. I'm currently using Java 21, Spring 6, and Thymeleaf 3. I've tested the application thoroughly, running it on Tomcat 10. The app ...
0
votes
1
answer
91
views
How to use different DTOs in the same @ModelAttribute between GET and POST in Spring MVC?
I'm working on a Spring Boot + Thymeleaf application where I have an edit page.
In my controller, I want to use different DTOs for the GET and POST methods:
ResponseDto for displaying data and ...
0
votes
1
answer
69
views
Spring Boot @ModelAttribute in method parameter not binding data
I am new to Spring Boot and have a question about the @modelattribute decorator.
My form data doesn't post to the Controller. Here's my code:
thymeleaf
<form th:action="@{/main}" th:...
0
votes
0
answers
101
views
Thymeleaf TemplateInputException when injecting dynamic fragment via ${content} in layout.html (Spring Boot 3.5.6)
I'm using Spring Boot 3.5.6 with Thymeleaf 3.1.3, and I'm trying to implement a dynamic layout system where I inject a fragment into layout.html using a model attribute.
Controller:
@GetMapping("/...
0
votes
0
answers
104
views
LIFF getIDToken returns undefined on iOS but works on Android
I am building an application with Java Spring Boot + Jquery using LiffSDK for my chat application.
@GetMapping
public String init(@RequestParam String liffChannelId,
@RequestParam String ...
1
vote
0
answers
123
views
Why does spring.thymeleaf.enabled break Spring Boot 3.5.0+?
I was testing a different Spring Boot + Thymeleaf example projects using 3.5.5 and the Thymeleaf view seemed to break if the 'spring.thymeleaf.enabled' setting was in application.properties. It didn't ...
0
votes
0
answers
70
views
How to use Model.getAttribute with thymeleaf in spring (boot) controller
I have a Many-to-Many relationship (train line and train station) and want to - when adding a new object (train station) - pass the via dropdown selected mapped entity (train line) id to the spring ...