How can multiple submits due to refresh button clicks be prevented?

Answer

Using a Post/Redirect/Get or a PRG pattern, this problem can be solved.

1. A form filled by the user is submitted to the server using POST or GET method. The state in the database and business model are updated.

2. A redirect response is used to reply by the servlet for a view page.

3. A view is loaded by the browser using the GET command and no user data is sent. This is safe from multiple submits as it is a separate JSP page.

All jsp Questions

Ask your interview questions on jsp

Write Your comment or Questions if you want the answers on jsp from jsp Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---