java.lang.ClassNotFoundException:org.owasp.csrfguard.CsrfGuardHttpSessionListener?
我正在开发OWASP CSRFGuard 3.0,但是我得到了 java.lang.ClassNotFoundException:org.owasp.csrfguard.CsrfGuardHttpSessionListener 我将这个jar保存在lib文件夹Owasp.CsrfGuard.jar中,并将CsrfGuard.properties保存在WEB-INFFloder中。请检查下面的WEB.xml文件以了解配置java.lang.ClassNotFoundException:org.owasp.csrfguard.CsrfGuardHttpSessionListener?,java,csrf,Java,Csrf,我正在开发OWASP CSRFGuard 3.0,但是我得到了 java.lang.ClassNotFoundException:org.owasp.csrfguard.CsrfGuardHttpSessionListener 我将这个jar保存在lib文件夹Owasp.CsrfGuard.jar中,并将CsrfGuard.properties保存在WEB-INFFloder中。请检查下面的WEB.xml文件以了解配置 <listener> <list
<listener>
<listener-class>org.owasp.csrfguard.CsrfGuardServletContextListener</listener-class>
</listener>
<listener>
<listener-class>org.owasp.csrfguard.CsrfGuardHttpSessionListener</listener-class>
</listener>
<context-param>
<param-name>Owasp.CsrfGuard.Config</param-name>
<param-value>/WEB-INF/csrfguard.properties</param-value>
</context-param>
<context-param>
<param-name>Owasp.CsrfGuard.Config.Print</param-name>
<param-value>true</param-value>
</context-param>
<filter>
<filter-name>CSRFGuard</filter-name>
<filter-class>org.owasp.csrfguard.CsrfGuardFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>CSRFGuard</filter-name>
<url-pattern>/save.html</url-pattern>
</filter-mapping>
我也在试着让它工作。。。你找到问题的根源了吗 在查看了OWASP提供的JAR文件之后
org.owasp.csrfguard.CsrfGuardServletContextListener
org.owasp.csrfguard.CsrfGuardHttpSessionListener
没有被包括在内 从csrftoken库的版本
4.0.0
开始,CsrfGuardHttpSessionListener
类已移动到单独的maven依赖项
在pom中,确保在基本库旁边包含会话扩展:
org.owasp
csrfguard
4.0.0
org.owasp
csrfguard扩展会话
4.0.0
org.owasp.csrfguard.CsrfGuardServletContextListener
org.owasp.csrfguard.CsrfGuardHttpSessionListener