This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Refresh Problem" Watch "Refresh Problem" New topic
Author

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.

Regards,
Arul.
Merrill Higginson
Ranch Hand

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


Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Refresh Problem
 
Similar Threads
form resubmission
Why is struts calling reset???
Preventing multiple posts...with popup windows in the mix
Multi Form Validation
Refreshing a page calls previous action