-ArequesthasbeendeniedasapotentialCSRFattack.
-Exceptionwhileprocessingbatch
java.lang.SecurityException@H_404_11@:CSRFSecurityError
atorg.directwebremoting.dwrp.BaseDwrpHandler.checkNotCsrfAttack(BaseDwrpHandler.java:85)
atorg.directwebremoting.dwrp.BaseCallHandler.handle(BaseCallHandler.java:76)
atorg.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:120)
解决方法:
在 web.xml 中的 dwr 的 servlet 配置里面,加入下列代码:
<!--需加入跨域调用配置信息:如果报错CSRFSecurityError-->
<init-param>
<param-name>crossDomainSessionSecurity</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>allowScriptTagRemoting</param-name>
<param-value>true</param-value>
</init-param>