Struts2 2.1.6升级2.3.15.1

删除jar:


asm.jar
asm-attrs.jar
cglib-2.1.3.jar
ognl-2.6.11.jar
xwork-2.1.2.jar
struts2-core-2.1.6.jar
struts2-dojo-plugin-2.1.6.jar
struts2-spring-plugin-2.1.6.jar
struts2-tiles-plugin-2.1.6.jar


添加jar:


asm-3.3.jar
asm-commons-3.3.jar
asm-tree-3.3.jar
cglib-2.2.jar
commons-lang3-3.1.jar
javassist-3.11.0.GA.jar
ognl-3.0.6.jar
xwork-core-2.3.15.1.jar
struts2-config-browser-plugin-2.3.15.1.jar
struts2-convention-plugin-2.3.15.1.jar
struts2-core-2.3.15.1.jar
struts2-dojo-plugin-2.3.15.1.jar
struts2-sitemesh-plugin-2.3.15.1.jar
struts2-spring-plugin-2.3.15.1.jar
struts2-tiles-plugin-2.3.15.1.jar


web.xml里的
<filter>
    <filter-name>struts-cleanup</filter-name>
    <filter-class>org.apache.struts2.dispatcher.ActionContextCleanUp</filter-class>
</filter>
<filter>
    <filter-name>struts2</filter-name>
    <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
修改为
<filter>
    <filter-name>StrutsPrepareFilter</filter-name>
    <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter</filter-class>
</filter>
<filter>
    <filter-name>struts2</filter-name>
    <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>


把所有struts.xml文件的头标题
<!DOCTYPE struts PUBLIC
        "-//Apache Software Foundation//DTD Struts Configuration 2.1//EN"
        "http://struts.apache.org/dtds/struts-2.1.dtd">
改为
<!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
    "http://struts.apache.org/dtds/struts-2.3.dtd">


报错:
Developer Notification (set struts.devMode to false to disable this message): Unexpected Exception caught setting 'cpage' on 'class com.hx.system.action.ManagerUserAction: Error setting expression 'cpage' with value ['2', ]


Developer Notification (set struts.devMode to false to disable this message): Unexpected Exception caught setting 'maxrow' on 'class com.hx.system.action.ManagerUserAction: Error setting expression 'maxrow' with value ['10', ]


设置struts.devMode=false,就没这种提示了.struts2.3.15.1校验严格了,开发模式下任何参数有提交但是没有对应set方法的时候都会有提示.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值