This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Browser Refresh

 
Rohit Prasad
Greenhorn
Posts: 12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I detect in my Action when user clicked refresh button from browser?

Thanks for any help.

Rohit
 
saivenu madhav
Greenhorn
Posts: 29
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello friends,

I have a problem which i am trying to resolve but not able to do so. Any help in this regard would be appreciated.

I have a jsp page (x.jsp) which has an "Add" button. On click of Add button, another popup jsp page (y.jsp) would open that would list the users details like firstname, middlename, lastname, email etc.. I select a record in the popup jsp page and clicks on the OK button. On click of the OK button, the selected record would be placed in the parent jsp page (x.jsp) and the popup jsp page (y.jsp) will close. Now i click the save button on the parent jsp page (x.jsp) which will save the selected user details along with other info on the page.

Now my problem is after successful save, if i click on the refresh button, the recently added user record will again get inserted into the database and now there would be two user records with same info which actually should not happen. Is there any way to avoid database insert on click of the refresh button.

Please help,

Thanks in Advance,

Madhav
 
vidya sagar
Ranch Hand
Posts: 580
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Go for savetoken stuff in struts
 
saivenu madhav
Greenhorn
Posts: 29
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Viday sagar,

I am using single action for inset&Update i.e SaveAction.

Could you please give some code to help the above problem. currenlty i am doing with




But it is not working .


ThanksInAdvance
Madhav
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic