由于struts漏洞,现必须将struts升级到2.5.26版本
需升级jar包
1.Struts2-core2.5.26
2.Commons-lang3 3.8.1
3.Ognl 3.1.28
需添加jar包
Log4j-api-2.12.1
需删除jar包
xwork-core(因为新版Struts2-core中已包含xwork-core)
需修改的文件
所有的struts.xml文件
头改成<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" "http://struts.apache.org/dtds/struts-2.5.dtd">
package标签添加 strict-method-invocation="false"
web.xml中struts2过滤器类org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter改为org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter