• 【structs2】>>> FilterDispatcher <<< is deprecated!


    在struts2.3.31下,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 Struts 2.1.3, 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>
  • 相关阅读:
    计算某一日期是在一年中第几周
    动态生成web表-asp.net table
    sql server 小技巧(7) 导出完整sql server 数据库成一个sql文件,包含表结构及数据
    循环取月的三位英语名 Jan Feb
    Python面向对象编程
    算法
    UDP Sockets in C#
    C++ 11
    GNU Make
    C++ 11
  • 原文地址:https://www.cnblogs.com/ruiser/p/6201714.html
Copyright © 2020-2023  润新知