wood burning stoves 2.0*
The moose likes Struts and the fly likes how to use token in struts 2 application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "how to use token in struts 2 application" Watch "how to use token in struts 2 application" New topic
Author

how to use token in struts 2 application

Maurya Rajdev
Greenhorn

Joined: Apr 16, 2009
Posts: 1
Hi ,

how to use token in struts 2 application tell me with example.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Use an interceptor stack that includes the "token" interceptor. Put the <s:token/> tag in your form. That's it.
Mudit Srivastava
Ranch Hand

Joined: Apr 30, 2007
Posts: 38
Adding onto what David said, it's wiser using a TokenSessionInterceptor in case you want to block the duplicate request
and returns the result from the initial request.
TokenSessionInterceptor
Leonardo Carreira
Ranch Hand

Joined: Apr 07, 2009
Posts: 489

Hi Friends...

i use velocity template engine as my view...
is it possible to use token in velocity?..

The tag <s:token/> is only for JSP..
is it any token tag in velocity?...
iam using velocity 1.6..

Thanks in advance all...


Sorry, perhaps my english language isn't too good.. Prepare for SCJP 6, Please God help me.. ☼
References : [Java.Boot] [JavaChamp] [JavaPrepare]
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Are you saying there's no #stoken?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to use token in struts 2 application
 
Similar Threads
Refreshing causing another submit request
prevent multiple submission of forms in struts
form resubmission
Multiple-submit prevention in JSF
restricting users resubmiting requests