• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Browser Refresh

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How can I detect in my Action when user clicked refresh button from browser?

Thanks for any help.

Rohit
 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Go for savetoken stuff in struts
 
saivenu madhav
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic