Struts2版本更新报错:>>> ActionContextCleanUp <<< is deprecated! Please use the new filters!
因低版本Struts2存在漏洞,更新为较新的版本。启动时,报如下警告信息:
***************************************************************************
* WARNING!!! *
* *
* >>> ActionContextCleanUp <<< 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 *
* *
***************************************************************************
自2.1.3版本开始,ActionContextCleanUp和FilterDispatcher都由StrutsPrepareAndExecuteFilter代替,配置如下:
注释掉
<filter>
<filter-name>struts2CleanupFilter</filter-name>
<filter-class>org.apache.struts2.dispatcher.ActionContextCleanUp</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2CleanupFilter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
</filter-mapping>
和
<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>*.nt</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>
改为:
<filter>
<filter-name>struts2Filter</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2Filter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
</filter-mapping>
另外,如果要使用sitemesh,要按照strutsPrepareFilter -> sitemesh -> strutsExecuteFilter的顺序配置过滤器,将sitemesh配置在中间,如下:
<filter>
<filter-name>strutsPrepareFilter</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter</filter-class>
</filter>
<filter>
<filter-name>sitemesh</filter-name>
<filter-class>com.opensymphony.module.sitemesh.filter.PageFilter</filter-class>
</filter>
<filter>
<filter-name>strutsExecuteFilter</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>strutsPrepareFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>sitemesh</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>strutsExecuteFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
Struts2版本更新报错:>>> ActionContextCleanUp <<< is deprecated! Please use the new filters!的更多相关文章
- hexo 报错 use_date_for_updated is deprecated...
hexo 报错 use_date_for_updated is deprecated... WARN Deprecated config detected: "use_date_for_up ...
- struts2启动报错com/opensymphony/xwork2/spring/SpringObjectFactory.java:220:-1
好久没有搞struts2,今天配置strut2.2.1,启动时遇到个小问题.记录下. tomcat启动报错: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 ...
- 用Struts2框架报错:The Struts dispatcher cannot be found
报错信息 The Struts dispatcher cannot be found. This is usually caused by using Struts tags without the ...
- python 报错 wxPyDeprecationWarning: Using deprecated class PySimpleApp.
如题:python 报错 提示为 : wxPyDeprecationWarning: Using deprecated class PySimpleApp. 解决:将 wx.PySimpleApp() ...
- pandas 使用panel 报错 Panel is deprecated and will be removed in a future version.
Panel is deprecated and will be removed in a future version.The recommended way to represent these t ...
- struts2+websocket报错:failed: Error during WebSocket handshake: Unexpected response code:404
最近把websocket集成进项目里面来,打开网页总是会遇到这样的错误. 网上说的原因有3种,但是都不适合我,但是也记录下. 1.struts2截拦掉了ws的请求.这种援用可以尝试把web.xml清空 ...
- struts2启动报错:ERROR com.opensymphony.xwork2.conversion.impl.DefaultConversionPropertiesProcessor - Conversion registration error
[framework] 2019-12-05 11:34:05,441 - org.springframework.web.context.ContextLoader -5352 [RMI TCP C ...
- php报错日志:PHP Deprecated:Automatically populating $HTTP_RAW_POST_DATA is deprecated
前几天将线上php服务升级到5.6.x版本后,php-error.log报出错误:PHP Deprecated: Automatically populating $HTTP_RAW_POST_DAT ...
- struts2 ,web.xml中配置为/*.action,运行报错Invalid <url-pattern> /*.action in filter mapp
首先,修改成: <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/ ...
随机推荐
- VK Cup 2015 - Qualification Round 1 D. Closest Equals 离线+线段树
题目链接: http://codeforces.com/problemset/problem/522/D D. Closest Equals time limit per test3 secondsm ...
- 主从复制redis
编辑主服务器的配置文件 注释下面一项 # slaveof 192.168.10.1 6379 主从复制 一主可以有多从,支持链式连级 一主多从 1:修改从服务器的配置文件/etc/redis.co ...
- jdbc 6.0
1.获取数据库自动生成的键值 package com.rong.jielong; import java.sql.Connection; import java.sql.DriverManager; ...
- 1st 本周工作量及进度统计
1. 项目:英文文章词频统计 项目类型:个人项目 项目完成情况:已完成 项目日期:2016.9.6 C(类别) C(内容) S(开始时间) ST(结束时间) I(耽误时间) △(实际时间) 分析 需求 ...
- Cobbler环境搭建
Cobbler服务器系统: CentOS 6.6 64位Cobbler版本: cobbler-2.6.11IP地址:192.168.166.136 1.安装epel库 rpm -ivh http:// ...
- (转)微软借力.NET开源跨平台支持,布局物联网平台开发
今天科技类最大的新闻,莫过于微软宣布.NET开发框架开源计划..NET 开源,集成 Clang 和 LLVM 并且自带 Android 模拟器,这意味着 Visual Studio 这个当下最好没有之 ...
- jumpserver的安装部署
废话不说直接安装 1:安装数据库 这里是提前安装,也可以不安装,在安装jumpserver主程序的时候,他会询问你是否安装 yum -y install ncurses-devel cmake ech ...
- 【前端学习笔记05】JavaScript数据存储Cookie相关方法封装
//Cookie设置 //设置新cookie function setCookie(name,value,duration){ var date = new Date(); date.setTime( ...
- [十四]SpringBoot 之 Spring拦截器(HandlerInterceptor)
过滤器属于Servlet范畴的API,与spring 没什么关系. Web开发中,我们除了使用 Filter 来过滤请web求外,还可以使用Spring提供的HandlerInterceptor(拦截 ...
- MFC中ON_COMMAND,ON_MESSAGE,ON_NOTIFY的区别
原文链接地址:https://blog.csdn.net/sufwei/article/details/3635489 ON_COMMAND //用来响应相应工具栏和菜单栏的命令WM_COMMAND, ...