在web.xml中添加如下代码:
<servlet>
<servlet-name>dwr-invoker</servlet-name> <servlet-class>uk.ltd.getahead.dwr.DWRServlet</servlet-class> <init-param> <param-name>debug</param-name> <param-value>false</param-value> </init-param><!-- crossDomainSessionSecurity设置成false表示允许跨域访问 避免浏览器报session error --> <init-param> <param-name>crossDomainSessionSecurity</param-name> <param-value>false</param-value> </init-param> <init-param> <param-name>allowGetForSafariButMakeForgeryEasier</param-name> <param-value>true</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet>