Student Name : ${enquiryDetails.name}
Course Name : ${enquiryDetails.courseName}
Your Enquiry is Received for above Details Admin Team will connect with you shortly.....
DBTable Records
===============
2000 Mahesh mahesh@gmail.com 123232 Angular 20-AUG-23
2001 Suresh Suresh@gmail.com 1232323 React 20-AUG-23
2002 Suresh Suresh@gmail.com 1232323 React 20-AUG-23
2003 Suresh Suresh@gmail.com 123232323 Devops 21-AUG-23
2004 Ramesh ramesh@gmail.com 1232323 SpringBoot 21-AUG-23
2005 Nagesh Nagesh@gmail.com 1232323 Devops 21-AUG-23
2006 Nagesh Nagesh@gmail.com 1232323 Devops 21-AUG-23
2007 Nagesh Nagesh@gmail.com 1232323 Devops 21-AUG-23
2008 Nagesh Nagesh@gmail.com 1232323 Devops 21-AUG-23
Solution : PRG Pattern
======================
* Post/Redirect/Get(PRG) is a web development design pattern that prevents the duplicate form submissions.
* Programatically we can implement this design pattern with following approach
1) Post Request method having capability to redirect the request to GET Request after submitting the form.
2) In the Spring MVC we can have the option to redirect the request from one request processor method to another request method using "redirect" attribute.
3) Please find the below code snippet for how we can redirect the request between request processor methods
@RequestMapping(value="processEnquiryForm", method=RequestMethod.POST)
public String processEnquiry(){
return "redirect:enquiryList";
}
@RequestMapping(value="enquiryList,method=RequestMethod.GET)
public String displayEnquiryList(){
return "enquiryList";
}
=========================================
Example Application On PRG Design Pattern
=========================================
web.xml
=======