1. 程式人生 > >頁面請求後臺方法,報錯Session error

頁面請求後臺方法,報錯Session error

在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>