struts2升级到2.3.16

旧项目struts 2.1.8.1 + spring 3.0.3 + hibernate3 spring-security2.0.5
struts2爆出漏洞,对原项目升级struts2
以下为需要用到jar
asm-3.3.jar
asm-tree-3.3.jar
asm-commons-3.3.jar
cglib-2.2.jar
commons-io-2.2.jar
commons-lang-2.4.jar
commons-lang3-3.1.jar

struts2-core-2.3.16.1.jar
struts2-spring-plugin-2.3.16.1.jar
struts2-json-plugin-2.3.16.1.jar
struts2-cdi-plugin-2.3.16.1.jar
struts2-codebehind-plugin-2.3.16.1.jar
struts2-config-browser-plugin-2.3.16.1.jar
struts2-convention-plugin-2.3.16.1.jar
struts2-dwr-plugin-2.3.16.1.jar
freemarker-2.3.19.jar
ognl-3.0.6.jar
xwork-core-2.3.16.1.jar
启动后报错:
1、[color=red]NoClassDefFoundError:com/opensymphony/xwork2/util/finder/ClassFinder$InfoBuildingVisitor[/color]
asm-3.3.jar

2、[color=red] Caused by: Cannot locate the chosen ObjectFactory implementation:spring - [unknown location][/color]
由于缺少了与spring连接的jar struts2-spring-plugin-2.3.16.1.jar

3、[color=red]Caused by: java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(Z)V[/color]
开始用的cglib包是cglib-2.1.3.jar ,后来换了一个cglib-2.2.jar

4、[color=red]Caused by: java.lang.ClassNotFoundException: Login!loginAction[/color]
原来已有的action突然找不到,原来新的struts2默认禁用,动态调用action方法
because struts2.3.15.1升级后 s:submit method not work action's method
要在struts.properties里面加
struts.enable.DynamicMethodInvocation = true
或者
<constant name="struts.enable.DynamicMethodInvocation" value="true" />
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值