Hi,
You can handle the same problem in another way.Same thing we have handled this way.

In such cases, when user resubmits the saveAction, we detect that the form is 
resubmitted using struts tokens and then instead of notifying the user that he has 
resubmitted, we just forward him to success page.(But in your case if u r requirement 
says you have to warn , that can also be done)I mean to the jsp where he would have 
gone if this was his first submission.

And you can decide this case by case basis.We have a method in abstractAction which is 
called when double submission is detected.It just forwards to a forward named 
invalidTokenAction.So every Save action has to define this forward in their mapping 
.Most of them define this forward to be same as success forward.But it may point to 
any other page, depending on the case.Else it will go to a global page saying that 
some form was resubmitted.


Hope this helps.
regards,
Shirish

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 06, 2003 4:05 PM
To: [EMAIL PROTECTED]
Subject: Token and workflow


Hi everyone, 

I asked for some questions about token and double submissions a couple of weeks 
ago. Today, i'm back to that problem and more specifically on the workflow. The 
double submission detection is Ok. But i don't know how to retrieve the normal 
flow of the application. I explain myself :

In my Prepare Action, i use the saveToken() method.
Then, the JSP is shown and the user can fill the form.
In my Process Action, i use the isTokenValid() then resetToken() methods.

If there's just one submission, everything works fine.

If there's a double submission, my Process Action class detects it and returns 
to the JSP (via the Prepare Action class) with an error message on the screen. 
Everything's fine until this point.

But then, what happens ? The user can see the message but nothing can happen.. 
I can't retrieve the workflow of my application and the user remains on that 
page with this message whereas the first call of the Process Action class is 
already finished..

I spent a lot of time on the web searching for examples but unfortunatly, i 
couldn't find something that suits to my problem..

Thanks in advance, Frederic

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to