| Author |
How token works in struts
|
kundanyasutech kundanyasutech
Greenhorn
Joined: Sep 09, 2005
Posts: 1
|
|
Hi guys, can anyone explain me how isTokenValid(javax.servlet.http.HttpServletRequest request) and saveToken(javax.servlet.http.HttpServletRequest request) works in struts. Thanks, kundan
|
 |
Marc Peabody
pie sneak
Sheriff
Joined: Feb 05, 2003
Posts: 4725
|
|
When saveToken() is called, a hidden field will automatically be added to forms in your jsps (assuming you use html:form). The Struts servlet stores [in session] the most recent token. isTokenValid() checks to see if the hidden variable submitted with the form matches the most recent one set through the saveToken method.
|
A good workman is known by his tools.
|
 |
 |
|
|
subject: How token works in struts
|
|
|