struts2.3升级到2.5.33
修改web.xml将过滤器改成:不然会报错
将“<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>”
改成
<filter-class>org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter</filter-class>
commons-lang3升级成3.14.0最新版本
不然会报找不到某个方法
2.3升级到2.5后,如果出现可以正常启动但是访问出现404
请在struts.xml文件中package中添加下面这
个<global-allowed-methods>regex:.*</global-allowed-methods>
注意他会提示错误这个跟顺序有关系,
你看你自己是放在第一个还是什么位置我是放在
<global-results>下面还有会提示没有这个方法这时候要把最上面的2改成2.5了如下:
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" "http://struts.apache.org/dtds/struts-2.5.dtd">
报属性[id]无效为tag[iterator] 通过TLD
因为升级了2.5后struts2 jsp页面iterator就没有id这个属性
id改成var
日志打印报页面escape问题
1.日志打印报页面.: [11], 列: [0]) 属性[escape]无效为tag[property] 通过
检页面是否存在escape属性将其替换成escapeHtml
把所有 spring3.x 的版本号更新为 spring4.x
1.org.xml.sax.SAXParseException; lineNumber: 10; columnNumber: 24; Attribute “singleton” must be declared for element type "bean"问题
修改源码包:xfire-spring-1.2.6(最新版-已经停止维护了-后续建议不要再使用了)
org/codehaus/xfire/spring/xfire.xml
org/codehaus/xfire/spring/xfireXmlBeans.xml
singleton=“true” 修改为scope=“singleton”
2、异常:cannot convert value of type ‘org.codehaus.xfire.spring.editors.ServiceFactoryEditor’ to …
原因:spring-4.*的customEditors获取类型直接指定为Class,而配置默认还是缺省的。
处理:找到下面配置文件
org/codehaus/xfire/spring/customEditors.xml
<bean id="xfire.customEditorConfigurer"
class="org.springframework.beans.factory.config.CustomEditorConfigurer">
<property name="customEditors"