ok, I found this which pretty much helped me understand what is going on:
http://www.mail-archive.com/[email protected]/msg35501.html
However I still have a problem:
In my showProductsAction I have the line: saveToken(request);
Then next option would be to click "add to cart" in which case I would go to
the CartAction accordingly. In my CartAction I check the token:
===============================
if (isTokenValid(request, true)) {
System.out.println("TOKEN IS VALID");
}
else {
System.out.println("TOKEN IS NO LONGER VALID");
}
===============================
Is the above code assumption correct or am I misinterpreting something?
Because when I submit "add to cart" I always jump into the else block!
Regards,
Michael
----- Original Message -----
From: "Michael Delamere" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, September 09, 2002 9:40 AM
Subject: [Tokens] Where can I find more information....
> Hi,
>
> I posted a thread last week about having caching problems and that my
> shopping cart was being incremented by 1 everytime somebody refreshed the
> browser.
>
> The answer I got was that one could use tokens. Sounds like a great idea!
> So I had a look at the struts-example to find out what it�s about but to
be
> honest I don�t understand exactly what is going on.
>
> I tried implementing the code almost exactly as it was done there and it
> keeps on telling me that my token is invalid. The problem I have here is
> that I don�t know what it means or what I have to do to correct this.
>
> 1. Does anyone know where I can find more information on these tokens?
>
> 2. Would it not be a good idea to include this in the struts-config
action
> configuration,
> i.e. token="true"?
>
> Any help would be really appreciated!
>
> Thanks,
>
> Michael
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>