Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Preventing page refresh in jsp pages

 
Ramesh kangamuthu
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I generated a web application using jsp related to online shopping. After submitting a record addition, if I press refresh button, again it adds the same information as another record to the database. Is there any clear way to prevent page refresh in jsp pages?

Regards,
Ramesh Kangamuthu
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't prevent page refreshes but the post-redirect-get pattern will eliminate them from causing a double post in your app.

Look in our JSP FAQ.
There is an entry on the subject in there.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic