以下將陸續整理出發現到的 Struts 2.0 與 Struts 2.1 不同之處,提供程式設計師從 Struts 2.0.X 轉換到 Struts 2.1.X 時一個注意清單。
  • Struts 2.1 預設是無法使用 Ognl 呼叫 class 中的 static method,必須在 struts.xml 或 struts.properties 中,將 struts.ognl.allowStaticMethodAccess 設成 true 才可作用。

    請參考「Struts 2.1.2 以上,Ognl 無法呼叫靜態方法的解決之法」文章。
     
  • Struts 2.1 在 struts-default.xml 中已經將 CookieInterceptor 的宣告拿掉。
    因此若有需要使用 CookiesAware 機制者,需另行宣告 CookieInterceptor。
     

arrow
arrow
    全站熱搜

    大笨鳥 發表在 痞客邦 留言(0) 人氣()