title: Security: implementing a solution against CSRF attacks in struts 1
body: <p>I need to implement a solution to prevent CSRF attacks in an application based on struts 1 framework.
  On the web, people suggest these kind of solutions:</p>
  
  <ul>
  <li>Struts saveToken(request) and isTokenValid(request, true) </li>
  <li>Libraries such as HDIV and OWASP CSRFGuard</li>
  </ul>
  
  <p>Currently I don’t know which one fit best for this problem.
  So can you give me your opinion on those solutions to direct my choice and if possible with an example
  or suggest other solution. </p>
  
  <p>Thanks for help</p>