This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts 2 Token interceptor Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 2 Token interceptor" Watch "Struts 2 Token interceptor" New topic

Struts 2 Token interceptor

nir sharma
Ranch Hand

Joined: Sep 11, 2012
Posts: 72

I create a demo project to implement token session to prevent multiple form submission. It worked fine.
But it didn't work when I implemented the same thing in my project.
I have written <s:token/> inside form tag in login.jsp.
In struts:

Rather than showing the login page, it showing the error page directly.
Any suggestions.
nir sharma
Ranch Hand

Joined: Sep 11, 2012
Posts: 72

I'm getting this warning in log file

can anyone help. I'm unable to find any solution related to this over the internet.
jatan bhavsar
Ranch Hand

Joined: Jul 23, 2008
Posts: 297

Hi Nir,

Can you post the whole code or the dummy application where its not working. Try to find out the changes because of which it works in one project and not working in another projectPost some code .
Also,Make sure s your <s:token> tag is inside the form tag.

nir sharma
Ranch Hand

Joined: Sep 11, 2012
Posts: 72

found the problem area, my struts code which was creating problem:

but it should be :

thanks for the help.
I agree. Here's the link:
subject: Struts 2 Token interceptor
It's not a secret anymore!