Skip to main content

PRG Pattern

Learn PRG Pattern (Spring MVC Architecture & Design Patterns, Spring MVC) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Fresher Notes PRG (Post-Redirect-Get): after a successful form POST, the server answers with a redirect and the browser then loads the result with a GET. Problem solved : refreshing the page after a POST would resubmit the form and, for example, create a duplicate order. In Spring MVC : return redirect:/orders/5 from the controller method.

More lessons in Spring MVC Architecture & Design Patterns