my dog learned polymorphism
The moose likes Struts and the fly likes Refresh Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Refresh Problem" Watch "Refresh Problem" New topic

Refresh Problem

Arulanand Dayalan
Ranch Hand

Joined: Aug 10, 2005
Posts: 124
Hi All,
I am using struts token to prevent multiple submissions in my application.
It works fine, i some cases i am facing problem.
I am telling the way i implement refresh control breifly below

In my action class i set the token and save it and then i forward to a Jsp.
On submission of that i form i go to action class and validate the token,if its valid one i set reset the token and proceed with the further operations. When it fails ( because he clicks on refresh) i redirect the user to the same screen. In some jsp in my application i have popup on click on submit button. Which will in turn have actioin hit and load some details in popup. User selects some details in popup and it comes back to main page. Then the form is submitted. When this happens in the action class, validate token method fails and i dont knw why this happens. Can any one suggest a way of overcoming this problem, it would be a great help to me.

Thanks in advance.

Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Try setting the token in the action called by your popup page.

Consultant, Sima Solutions
I agree. Here's the link:
subject: Refresh Problem
It's not a secret anymore!