kitten

  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  11 随笔 :: 0 文章 :: 0 评论 :: 0 Trackbacks

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

<filter> <filter-name>struts2</filter-name> <filter-class> org.apache.struts2.dispatcher.FilterDispatcher </filter-class>

会出现
***********************************************************************
*                               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 Struts2.3.16.1, use StrutsPrepareAndExecuteFilter instead or StrutsPrepareFilterand StrutsExecuteFilter if needing using the ActionContextCleanUp filter in addition to this one..即,从Struts 2.1.3起已被标注为过时的,改用StrutsPrepareAndExecuteFilter

解决方法,将web.xml上述代码改为:

复制代码


<
filter> <filter-name>struts2</filter-name> <filter-class> org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter </filter-class> </filter>
来自:http://www.cnblogs.com/babybluevino/
posted on 2014-04-08 20:23 云③+_+输 阅读(533) 评论(0)  编辑  收藏 所属分类: struts2

只有注册用户登录后才能发表评论。


网站导航: