This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes how to use <s:token> Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "how to use <s:token>" Watch "how to use <s:token>" New topic
Author

how to use <s:token>

pankaj semwal
Ranch Hand

Joined: Oct 07, 2008
Posts: 300
Hi

How to use <s:token> in strut.


I did like this
In useAdd.jsp


userList.jsp


and in strut.xml


and inTokenInterceptor.properties

struts.message.invalid.token=You already Submitted the form.

But when i try to add the user .
It show the message

The form has already been processed or no token was supplied, please try again.


I am unable to understand why this message is coming and from where,

Please help me.

Thanks






pankaj semwal
Ranch Hand

Joined: Oct 07, 2008
Posts: 300
any body tell me where i wrong.
So that this message is coming

The form has already been processed or no token was supplied, please try again.
Mudit Srivastava
Ranch Hand

Joined: Apr 30, 2007
Posts: 38
Use tokenSessionInterceptor instead. Rather than returning the invalid.token when it detects a duplicate request, it blocks the duplicate request and returns the result from the initial request.
 
 
subject: how to use <s:token>
 
Similar Threads
Problem of resubmisson in struts2
Token Interceptor
Struts 2: Forms with multiple submit buttons - Best Practice?
Struts 2 Validation
struts2: how to invoke a method from the xml conf file. what shoud be the type?