由于 struts2 2.1.8.1 的版本存在漏洞,需要升级到2.3.14.3
升级所需修改的包删除
struts2-convention-plugin-2.1.x.1.jar
struts2-core-2.1.x.1.jar
struts2-embeddedjsp-plugin-2.1.x.1.jar
struts2-json-plugin-2.1.x.1.jar
struts2-spring-plugin-2.1.x.1.jar
xwork-core-2.1.8.jar
ognl-2.7.3.jar
添加
commons-lang3-3.1.jar
javassist-3.11.0.GA.jar
ognl-3.0.6.jar
struts2-convention-plugin-2.3.14.3.jar
struts2-core-2.3.14.3.jar
struts2-embeddedjsp-plugin-2.3.14.3.jar
struts2-json-plugin-2.3.14.3.jar
struts2-spring-plugin-2.3.14.3.jar
xwork-core-2.3.14.3.jar
若将asm.jar改为asm-3.3.jar
需添加asm-tree-3.3.jar
asm-commons-3.3.jar
同时修改cglib-2.1.3为cglib-2.2
同时将:
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher
</filter-class>
修改为
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
</filter-class>