I'm trying to use the saveToken function but is not working here is what I have: a parameter called "action"
if("save".equals(request.getParameter("action")))
{
if(!isTokenValid(request)){
System.out.println("our of transaction order");
resetToken(request);
}
//save stuff
}
else if("validate".equals(request.getParameter("action")))
{
saveToken(request); //validate stuff

}

any inside will be very helpful

thanks
gus
Trieu, Danny wrote:

No-cache settings in the controller will make sure that every response going
Through the controller will have its head setting to no-cache on the user Browser. Meaning, the content on the user browser get expired as the user
Going to another page, and so when the user click the back button the
browser
Will request to the server for the new contents of whatever on the history Stack. With transaction token, if there is a match meaning you have a good
Transaction, a sync with the current state, and you can go on and process
The request. Else, there isn't a match with the token which mean out of
sync
Then you can handle the condition as if it is out of sync.

Hope this would help.

danny

-----Original Message-----
From: Gus Delgado [mailto:gdelgado@;oceanobjects.com] Sent: Wednesday, October 30, 2002 8:49 AM
To: Struts Users Mailing List
Subject: Re: back button


please explain the controller to no-cache part?

Trieu, Danny wrote:


Use transaction token to guaranty your transaction. And don't forget To set your controller to no-cache.

-----Original Message-----
From: David Graham [mailto:dgraham1980@;hotmail.com]
Sent: Wednesday, October 30, 2002 7:29 AM
To: [EMAIL PROTECTED]
Subject: Re: back button


That is an absolutely hideous solution to the problem. Breaking the user's
back button will only make them angry.

David






From: "Affan Qureshi" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: Re: back button
Date: Wed, 30 Oct 2002 19:47:39 +0500

You can disable the back button by using JavaScript history.forward()
at
the
top of your page. But i dont know if that solves your problem.

----- Original Message -----
From: "Gus Delgado" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, October 30, 2002 6:38 PM
Subject: back button




I have a JSP that has a sequence of actions. First one is
"validate" which will validate some IO File and the next one is "load" to load the file.

When the user hits "validate" it sends a request to the back-end to
do some validation and I get back a response. When I hit Load it sends a request to the back-end to persist that file.

the Load button depends on the validation button. When click
validate and get an ok response, load shows.

The problem is the back button on the browser, the file is already
validated but if I hit the back button the ui and the back-end are our of sync I can validate again.

Any one run into this problem? how can it be handlel? thanks.



--
To unsubscribe, e-mail:


<mailto:struts-user-unsubscribe@;jakarta.apache.org>


For additional commands, e-mail:


<mailto:struts-user-help@;jakarta.apache.org>

--
To unsubscribe, e-mail: <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>


_________________________________________________________________
Surf the Web without missing calls! Get MSN Broadband.
http://resourcecenter.msn.com/access/plans/freeactivation.asp


--
To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@;jakarta.apache.org>

--
To unsubscribe, e-mail:

<mailto:struts-user-unsubscribe@;jakarta.apache.org>

For additional commands, e-mail:

<mailto:struts-user-help@;jakarta.apache.org>

.







--
To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@;jakarta.apache.org>

--
To unsubscribe, e-mail: <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>


.




--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>

Reply via email to