In a normal Spring MVC application, every form submitted POSTs the form data to the server; a normal Spring Controller retrieves the data from those forms from the request and processes it further. Once the operation is successful, the user is forwarded to another page showing a message that the operation was a success.
Traditionally, if we handle this scenario via the POST/Forward/GET
pattern, then it may sometimes cause multiple form submission issues. The user might press F5 and the same form will be submitted again. To resolve this issue, the POST/Redirect/GET
pattern is used in many web applications. Once the user's form is submitted successfully, we redirect the request to another success page instead of forwarding it. This makes the browser perform a new GET request and load the GET page. Thus if the user even presses F5 multiple times, the GET request gets loaded instead of submitting the form again and again.
While the POST/Redirect/GET
pattern seems to perfectly solve...