How can I prevent data to be added into my database twice when using a form on a JSP page? On Browser refresh, the same data is added to my database table.

Govind Seshadri

Set a boolean variable with session scope when you successfully add data into the database the first time around. You can then check for the presence of this variable whenever the user performs a refresh - if the variable is true, then simply skip the database insert.

0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact