Add CSRF token to all the FORM submissions
问题 I recently enabled CSRF protection in my web Application. There are around 100+ JSP pages containing FORM submission. What is the best way adding CSRF token : <input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/> such that all the form submission will have this form data. I don't want to add this parameter to every individual FORM submit. 回答1: So I've finally found a working solution. Basically I create a custom FormRenderer like this : import com.sun.faces.renderkit