Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Jsp Refresh problem  RSS feed

 
Vinod Borole
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
WORKFLOW:

First JSP page linked to Second JSP page. On second page i accept some information from user, on click of add i send this to my controller (AddInfoController.java) which is responsible for passing this to a DAO(AddInfoDAO.java) and finally to the database(SQL Server). As a response i am redirecting the user to the first page and display a SUCCESS message .

PROBLEM:
On SUCCESS message i am on first page, when i (browser - F5)refresh this first page, AddInfoController.java is called which is responsible for adding the same info one more time in the DB.

MORE INFO:
1.I have used FORM action as POST on second page.
2.Using Spring framework

Any help would be appreciated.

Thanks
Vinod



 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65824
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Read this article paying particular attention to the PRG pattern.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!