From 9b3396e2b5cb3660a94fb4a4c0dfb873b46ce224 Mon Sep 17 00:00:00 2001 From: Kamal Wickramanayake Date: Sat, 6 Jun 2026 20:02:35 +0530 Subject: Added a Spring Boot + Thymeleaf based form validation sample application code --- .../src/main/resources/templates/contact/form.html | 36 ++++++++++++++++++++++ .../main/resources/templates/contact/result.html | 16 ++++++++++ .../src/main/resources/templates/index.html | 18 +++++++++++ 3 files changed, 70 insertions(+) create mode 100644 spring-boot/06-form-handling-with-thymeleaf/src/main/resources/templates/contact/form.html create mode 100644 spring-boot/06-form-handling-with-thymeleaf/src/main/resources/templates/contact/result.html create mode 100644 spring-boot/06-form-handling-with-thymeleaf/src/main/resources/templates/index.html (limited to 'spring-boot/06-form-handling-with-thymeleaf/src/main/resources/templates') diff --git a/spring-boot/06-form-handling-with-thymeleaf/src/main/resources/templates/contact/form.html b/spring-boot/06-form-handling-with-thymeleaf/src/main/resources/templates/contact/form.html new file mode 100644 index 0000000..0229e0d --- /dev/null +++ b/spring-boot/06-form-handling-with-thymeleaf/src/main/resources/templates/contact/form.html @@ -0,0 +1,36 @@ + + + + + Contact Us + + + + +

Contact Us

+ +
+
+ + +
+
+ +
+ + +
+
+ +
+ + +
+
+ + +
+ + + + \ No newline at end of file diff --git a/spring-boot/06-form-handling-with-thymeleaf/src/main/resources/templates/contact/result.html b/spring-boot/06-form-handling-with-thymeleaf/src/main/resources/templates/contact/result.html new file mode 100644 index 0000000..1bb4b45 --- /dev/null +++ b/spring-boot/06-form-handling-with-thymeleaf/src/main/resources/templates/contact/result.html @@ -0,0 +1,16 @@ + + + + Contact Us + + + +

Contact Us

+ +

We received your message.

+ +

+ + Try again + + \ No newline at end of file diff --git a/spring-boot/06-form-handling-with-thymeleaf/src/main/resources/templates/index.html b/spring-boot/06-form-handling-with-thymeleaf/src/main/resources/templates/index.html new file mode 100644 index 0000000..48e251d --- /dev/null +++ b/spring-boot/06-form-handling-with-thymeleaf/src/main/resources/templates/index.html @@ -0,0 +1,18 @@ + + + + + Form handling example with Thymeleaf + + + + + +

Form handling example with Thymeleaf

+ +Contact Us + + + + + -- cgit v1.2.3