Serving Web Content with Spring MVC
ref: https://spring.io/guides/gs/serving-web-content/#initialThis task was done. Name attribute was given and changed , so that the when the name is changed it will be displayed
Handling Form Submission
ref: https://spring.io/guides/gs/handling-form-submission/Steps done
- Created the relevent directories manually
- added the pom.xml file
- Parent as spring-boot-starter-parent version 2.1.6.RELEASE
- Inserted the dependencies
- spring-boot-starter-web
- spring-boot-starter-thymeleaf (usage of thymeleaf as a java based library was not recommended.Using JSP and JSTL is better.)
- plugins
- spring-boot-maven-plugin
- Made java files.
- GreetingController.java (Where the GET and POST mapping is done)
- Greeting.java (ids setters and getters)
- Application.java (Application starting place)
- Made the .html files
- greeting.html (where the submission happens)
- result.html (where the displaying happens)
- Making application Excutables
- mvn clean package
- java -jar target/gs-handling-form-submission-0.1.0.jar
Handling Form Submission with
What we were doing was using spring boot..The previous examples were based on spring boot
https://www.mkyong.com/spring3/spring-3-mvc-hello-world-example/
Comments
Post a Comment