If I have existing JSP Tag Library. In JSP I can add this:
<%@taglib uri="http://www.owasp.org/index.php/Category:OWASP_CSRFGuard_Project/Owasp.CsrfGuard.tld" prefix="csrf" %>
<form>
...
<input type="hidden" name="<csrf:token-name/>" value="<csrf:token-value/>"/>
</form>
This is what I tried adding to a JSF2 faclet page. It does not like this.
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:csrf="http://www.owasp.org/index.php/Category:OWASP_CSRFGuard_Project/Owasp.CsrfGuard.tld">
...
<h:form ...>
....
<input type="hidden" name="#{csrf:token-name}" value="#{csrf:token-value}"/>
</h:form>
Is it even possible to do what I am thinking I can do?
Right now I am getting this error:
javax.servlet.ServletException: Encountered ":" at line 1, column 7.
Was expecting one of:
"}" ...
"." ...
"[" ...
">" ...
"gt" ...
"<" ...
"lt" ...
">=" ...
"ge" ...
"<=" ...
"le" ...
"==" ...
"eq" ...
"!=" ...
"ne" ...
"&&" ...
"and" ...
"||" ...
"or" ...
"*" ...
"+" ...
"-" ...
"/" ...
"div" ...
"%" ...
"mod" ...
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:606)
...