You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by John Dowson <jl...@gmail.com> on 2010/06/18 12:00:58 UTC

Struts2 form token not matching session token

Hi all,

I am having a strange problem with the struts2 token tag and the token-session interceptor.
It seems like the token added to the form does not match the token in the session and I am getting tan "invalid.token" result with a warning in the logs:
	Form token 90U722BNQ4LU82SOBG93TGGGRPC918NZ does not match the session token DJPDLZTQPDB2U5QBKGSAI3B63NDAVE65.

I had this problem a few days ago but it seemed to disappear. (I posted to stackoverflow:  http://stackoverflow.com/questions/3047923/struts2-invalid-token-returned-when-form-submitted-using-jquery)

I have added an interceptor to print out the session map on each call and it looks like the token added to the form is never in the session, so where is this value coming from?

Any help greatly appreciated.

Thanks and regards,

John



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts2 form token not matching session token

Posted by John Dowson <jl...@gmail.com>.
Yep, I am using Firebug (and burbsuite to intercept the requests). Can't find out where the form value is coming from though as this is generated server-side.

Cheers,

John


On 18 Jun 2010, at 11:51, Alex Rodriguez Lopez wrote:

> If you are not using it already, I suggest using FireBug to inspect the data sent along with each request, so maybe you can find where these values come from.
>> Hi all,
>> 
>> I am having a strange problem with the struts2 token tag and the token-session interceptor.
>> It seems like the token added to the form does not match the token in the session and I am getting tan "invalid.token" result with a warning in the logs:
>> 	Form token 90U722BNQ4LU82SOBG93TGGGRPC918NZ does not match the session token DJPDLZTQPDB2U5QBKGSAI3B63NDAVE65.
>> 
>> I had this problem a few days ago but it seemed to disappear. (I posted to stackoverflow:  http://stackoverflow.com/questions/3047923/struts2-invalid-token-returned-when-form-submitted-using-jquery)
>> 
>> I have added an interceptor to print out the session map on each call and it looks like the token added to the form is never in the session, so where is this value coming from?
>> 
>> Any help greatly appreciated.
>> 
>> Thanks and regards,
>> 
>> John
>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts2 form token not matching session token

Posted by Alex Rodriguez Lopez <al...@flordeutopia.pt>.
If you are not using it already, I suggest using FireBug to inspect the 
data sent along with each request, so maybe you can find where these 
values come from.
> Hi all,
>
> I am having a strange problem with the struts2 token tag and the token-session interceptor.
> It seems like the token added to the form does not match the token in the session and I am getting tan "invalid.token" result with a warning in the logs:
> 	Form token 90U722BNQ4LU82SOBG93TGGGRPC918NZ does not match the session token DJPDLZTQPDB2U5QBKGSAI3B63NDAVE65.
>
> I had this problem a few days ago but it seemed to disappear. (I posted to stackoverflow:  http://stackoverflow.com/questions/3047923/struts2-invalid-token-returned-when-form-submitted-using-jquery)
>
> I have added an interceptor to print out the session map on each call and it looks like the token added to the form is never in the session, so where is this value coming from?
>
> Any help greatly appreciated.
>
> Thanks and regards,
>
> John
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org