You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Diego Manilla Suárez <di...@xeridia.com> on 2009/11/30 14:21:52 UTC
Problems with tokenSession interceptor
Hi. I'm trying to use the tokenSession interceptor to prevent double
submit problems. The problem is that this line in TokenHelper.setToken
(invoked from <s:token /> tag) always return null:
ActionContext.getContext().getSession()
I'm also using the createSession interceptor, but it's still not working.
What else should I do to get this to work?
Thanks in advance
****
****
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Problems with tokenSession interceptor
Posted by Diego Manilla Suárez <di...@xeridia.com>.
I found the problem. I was mapping the FilterDispatcher servlet for all
dispatchers, like this:
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>INCLUDE</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>ERROR</dispatcher>
</filter-mapping>
So the FilterDispatcher servlet was creating new ActionContexts for each
JSP being forwarded (I'm using Tiles). I don't remember why I mapped the
servlet to all dispatchers, but I suppose some day I'll find out the
reason ;)
Diego Manilla Suárez escribió:
> Hi. I'm trying to use the tokenSession interceptor to prevent double
> submit problems. The problem is that this line in TokenHelper.setToken
> (invoked from <s:token /> tag) always return null:
>
> ActionContext.getContext().getSession()
>
> I'm also using the createSession interceptor, but it's still not working.
>
> What else should I do to get this to work?
>
> Thanks in advance
>
> ****
>
> ****
>
> ---------------------------------------------------------------------
> 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