If I implement the Synchronizer Token in my struts application, would i need to edit all my forms to add some kind of tag for the token or is that done automatically by struts?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The action’s
saveToken()method generates a token and puts it in session scope, then thehtml:formtag adds the token automatically to your page.Here is a code snippet from the
html:formcustom tag handler:So, if you are using Struts
html:formtags you don’t have to do anything, Struts will take care of adding the field. If instead you use classic HTML form tags, then you have to add the field by yourself.