Spring: Developing Java Applications for the Enterprise
by Ravi Kant Soni, Amuthan Ganeshan, Rajesh RV
Flash attribute
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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access