-
what are the features of Tokens in struts ? (2 messages)
- Posted by: sridhar Matte
- Posted on: March 01 2007 03:46 EST
Hi, i have a question in struts frame work, what is the purpose of token in struts? and Please give the one or two realtime examples. hope i will get response with exmaple. Thanks sridhar HYDThreaded Messages (2)
- Re: what are the features of Tokens in struts ? by Alberto Flores on March 20 2007 13:14 EDT
- Re: what are the features of Tokens in struts ? by satya das on June 27 2008 03:49 EDT
-
Re: what are the features of Tokens in struts ?[ Go to top ]
- Posted by: Alberto Flores
- Posted on: March 20 2007 13:14 EDT
- in response to sridhar Matte
The main problem that tokens are trying to solve is the one of double submissions of forms. Interestingly enough, it can also be used to handle the "back" and "forward" button behavior. The concept basically works around the fact that struts assigns tokens to each page it serves (forms) expecting those token back. If the token is not valid, then you know a double submission took place. It basically works around the following 3 methods (which can be used within any Action Class) * saveToken(HttpServletRequest req) * isTokenValid(HttpServletRequest req) * resetToken(HttpServletRequest req) Take a look at: http://www.learntechnology.net/content/struts/struts_token.jsp for examples. Hope this helps! -
Re: what are the features of Tokens in struts ?[ Go to top ]
- Posted by: satya das
- Posted on: June 27 2008 03:49 EDT
- in response to sridhar Matte
prevent mutli-click using struts tokens http://www.techfaq360.com/tutorial/multiclick.jsp