• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to use token in struts 2 application

 
Maurya Rajdev
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

how to use token in struts 2 application tell me with example.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use an interceptor stack that includes the "token" interceptor. Put the <s:token/> tag in your form. That's it.
 
Mudit Srivastava
Ranch Hand
Posts: 38
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 489
Eclipse IDE Java Postgres Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you saying there's no #stoken?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic