DWR问题解决
2008-02-26 11:56:39| 分类: 框架相关 |字号 订阅
dwr遇到这种错误:
org.directwebremoting.util.CommonsLoggingOutput error
严重: A request has been denied as a potential CSRF attack.
在参照dwr的官方网站时,如果在后台出现如下的提示信息:A request has been denied as a potential CSRF attack
则,需要在web.xml中的如下配置修改一下
xml 代码
<servlet>
<servlet-name>dwr-invokerservlet-name>
<servlet-class>uk.ltd.getahead.dwr.DWRServletservlet-class>
<init-param>
<param-name>debugparam-name>
<param-value>trueparam-value>
init-param>
servlet>
修改为:
xml 代码
<servlet>
<servlet-name>dwr-invokerservlet-name>
<servlet-class>uk.ltd.getahead.dwr.DWRServletservlet-class>
<init-param>
<param-name>debugparam-name>
<param-value>trueparam-value>
init-param>
<init-param>
<param-name>crossDomainSessionSecurityparam-name>
<param-value>falseparam-value>
init-param>
servlet>
即加入了跨域调用功能
报错:allowScriptTagRemoting is false
在WEB.xml中加入:
<init-param>
<param-name>allowScriptTagRemoting</param-name>
<param-value>true</param-value>
</init-param>
转自:
http://liuwei1578.blog.163.com/blog/static/495803642008126115639956/
2008-02-26 11:56:39| 分类: 框架相关 |字号 订阅
dwr遇到这种错误:
org.directwebremoting.util.CommonsLoggingOutput error
严重: A request has been denied as a potential CSRF attack.
在参照dwr的官方网站时,如果在后台出现如下的提示信息:A request has been denied as a potential CSRF attack
则,需要在web.xml中的如下配置修改一下
xml 代码
<servlet>
<servlet-name>dwr-invokerservlet-name>
<servlet-class>uk.ltd.getahead.dwr.DWRServletservlet-class>
<init-param>
<param-name>debugparam-name>
<param-value>trueparam-value>
init-param>
servlet>
修改为:
xml 代码
<servlet>
<servlet-name>dwr-invokerservlet-name>
<servlet-class>uk.ltd.getahead.dwr.DWRServletservlet-class>
<init-param>
<param-name>debugparam-name>
<param-value>trueparam-value>
init-param>
<init-param>
<param-name>crossDomainSessionSecurityparam-name>
<param-value>falseparam-value>
init-param>
servlet>
即加入了跨域调用功能
报错:allowScriptTagRemoting is false
在WEB.xml中加入:
<init-param>
<param-name>allowScriptTagRemoting</param-name>
<param-value>true</param-value>
</init-param>
转自:
http://liuwei1578.blog.163.com/blog/static/495803642008126115639956/