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

来源:互联网 发布:软件著作权说明书范本 编辑:程序博客网 时间:2024/05/24 05:44

今天在开发东西的时候,出现了以下的问题:

 ***********************************************************************
*                               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            *
*                                                                     *
***********************************************************************,

当时一阵懵逼,还没见过这样的错误,在网上找了一阵,发现了一个行之有效的方法,

把,

<filter>  <filter-name>struts2</filter-name>  <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>  </filter>  <filter-mapping>   <filter-name>struts2</filter-name>   <url-pattern>/*</url-pattern>  </filter-mapping>
改为,

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

为题得到解决!

0 0
原创粉丝点击