Questions tagged [spring-thymeleaf]
289 questions
0
votes
1 answer
custom login page not working after authorizeRequest() deprecation - spring boot & security
I am trying to replace a simple thymeleaf login page with the default one. The problem is it is not working as expected. I am getting the authorization requred as an alert for example. I am providing the screenshots and codes for the security in…

Saman KHATAEI
- 67
- 9
0
votes
1 answer
One additional duplicate file gets uploaded
I have my FileUpload Controller like this:
@PostMapping("/uploadFile")
public AppUserDocumentUploadResponse uploadFile(@RequestParam("file") MultipartFile file) {
AppUserDocument dbFile = appUserDocumentStorageService.storeFile(file);
…

Ajay Kumar
- 2,906
- 3
- 23
- 46
0
votes
0 answers
how to delete data without page refresh in thymeleaf spring boot using ajax
I am trying to delete a record without refreshing the page using AJAX but I don't know where to start. The deletion works very well but the problem is that it refreshes the page. Can somone help me with the scripts that I have to add ? and also…

Lele Vaneck
- 5
- 5
0
votes
1 answer
#temporals.format() throws NullPointerException
I'm struggling to format a LocalDate in Thymeleaf like so:
This throws a NPE with the message: target is null for method format where…

Malte Esch
- 1
- 1
- 3
0
votes
0 answers
How to configure the modal to display the retrieved data from a table in springboot?
Customer.java
@Entity
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Customer {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String name;
private String relative;
private String address;
private Long…

M R
- 73
- 7
0
votes
1 answer
Spring Validation with Kotlin, Javax & Jakarta & Thymeleaf
I'm trying to validate my fields in spring MVC, I tried several ways, but none of them worked.
I used
implementation("org.springframework.boot:spring-boot-starter-validation") and then implementation("javax.validation:validation-api:2.0.1.Final")
I…

Saher Al-Sous
- 517
- 4
- 15
0
votes
1 answer
I have problem in insert data in spring jpa repository
my problem is:
`
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Thu Dec 01 00:18:24 ICT 2022
There was an unexpected error (type=Internal Server Error, status=500).
could not execute…

HocerChicken
- 1
- 2
0
votes
0 answers
Where should I set locale for Thymeleaf?
I have Thymeleaf template:
Welcome to our grocery store!
And I have several language bundles such as home_en.properties, home_fr.properties, etc. Thymeleaf must take messages from appropriate bundle according to…
bleschunov
- 41
- 6
0
votes
0 answers
Populating a list in Thymeleaf from Spring Boot error parsing template
Hello I am trying to populate some dropdowns from a database in Thymeleaf. I get this error:
2022-11-29 12:11:25.525 ERROR 17836 --- [io-8080-exec-10] org.thymeleaf.TemplateEngine
: [THYMELEAF][http-nio-8080-exec-10] Exception…

SerbanRamon
- 97
- 1
- 1
- 7
0
votes
0 answers
Thymeleaf - Unescaped text does not respect HTML structure
I want to display a description formatted in HTML, directly in a card (see below). However Thymeleaf utext attribute does not respect my HTML structure.
I removed all CSS classes for better visibility.
Here is how I defined my structure with…

Zerak
- 38
- 6
0
votes
1 answer
Errors not being displayed with thymleaf th:if & th:errors, even though errors are in BindingResult
As the title says I'm trying to display the errors in the HTML. The BindingResult contains the errors, that were found. The th:if="${#fields.hasAnyErrors()}" returns false.
I'm not very experienced in any of this. I just combined some stuff I read…

dpkass
- 43
- 6
0
votes
1 answer
How can resolve this error Template parsing error in thymeleaf
My controller
My repository
My Entity file
My Html File
Error while running 1/3
Error page cont. 2/3
Error page cont. 3/3
I am a beginner self learning through videos and courses, so please help me with it.

M R
- 73
- 7
0
votes
0 answers
Assert multiple field error codes from Validation using MockMvc
I am trying to assert two errors due to two given constraints to my form. My form has two constraints on its single field:
@Data
@NoArgsConstructor
@NotExistingGroup(groups = SecondGroupValidation.class)
public class GroupForm {
@NotBlank(groups…

patientCoder
- 71
- 1
- 6
0
votes
1 answer
Thymeleaf populate a date field with date
I need help populating a date field for an edit page in Thymeleaf. So Im a beginner with this but I've tried so many variations I don't know the best approach now. So Im passing the Employee list to thymeleaf with a model.addTribute("employee",…

Kayd Anderson
- 81
- 7
0
votes
0 answers
image not loading in thymeleaf springboot mvn application
I am trying to figure out what is wrong here I have already tried all the possible solutions available on the web. So please look into this problem I am frustrated I have spent the whole night on this.File Structure Of My Project
the ways I have…

Dipesh Singh
- 1
- 1