Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Refreshing causing another submit request

 
sreenath reddy
Ranch Hand
Posts: 415
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I had used frames in my application and the thing is that i have some operation which opens a popup and i will submit that popup and close it and th e result of that operation will be appearing in the main window(mean the target will be the parent window)

but what happens after this operation is done ,right click on the parent frame and say refresh .this calls the old operation leading to duplicate entries in DB r some unwanted things happening

is it my responsibility to handle this at the server side r is there any easy way of over coming this ??
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could try to use a token in the HttpSession to keep track of whether you've already processed the request or not (i.e. whether you should just skip to rendering the UI). Another option would be to check out these two articles:
RedirectAfterPost
RedirectAfterPost2
 
Anand Gondhiya
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
google for the word "saveToken"
you shd get everythign. I just used it few days back
 
Anand Gondhiya
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
struts has this token functinoality.

2 token function calls......and you will be done !!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic