>>> FilterDispatcher <<< is deprecated! Please use the new filters!

參考網址:http://www.cnblogs.com/sophine/archive/2013/07/18/3199289.html


>>> FilterDispatcher <<< is deprecated! Please use the new filters!

在struts2.3.7下,web.xml中使用

會出現
***********************************************************************
                              WARNING!!!                            *
                                                                    *
* >>> FilterDispatcher <<< is deprecated! Please use the new filters! *
                                                                    *
          This can be a source of unpredictable problems!           *
                                                                    *
             Please refer to the docs for more details!             *
           http://struts.apache.org/2.x/docs/webxml.html            *
                                                                    *
***********************************************************************
原因在於:

Class FilterDispatcher

Deprecated. Since Struts 2.1.3, use StrutsPrepareAndExecuteFilter instead or StrutsPrepareFilterand StrutsExecuteFilter if needing using the ActionContextCleanUp filter in addition to this one
解決方法,將web.xml上述代碼改爲:

 <filter>
        <filter-name>struts2</filter-name>
        <filter-class>
            org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
        </filter-class>
        <init-param>
        <param-name>struts.action.extendion</param-name>
        <param-value>action</param-value>
        </init-param>
    </filter>


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章