struts2升级注意几点

struts2升级注意几点  

2012-07-19 10:11:55|  分类: 编程技术|字号 订阅

昨天安全组报告struts2.2之前的版本有通用漏洞,需要将其升级到最新版2.3.4,在升级过程中遇到几个问题,留贴记录

1,涉及struts2-core-2.3.4.jar,struts2-spring-plugin-2.3.4.jar,xwork-core-2.3.4.jar,ognl-3.0.5.jar,javassist-3.11.0.GA.jar这些包
2,struts.xml的头定义dtd部分要改为
    "-//Apache Software Foundation//DTD Struts Configuration   2.3//EN"
    " struts-2.3.dtd">
红字的文件是从官网下到本地路径的,如果不改会报错:
Jul 18, 2012 6:26:12 PM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter struts2
Unable to load configuration. - Class: java.net.PlainSocketImpl
File: PlainSocketImpl.java
Method: connect
Line: 195 - java/net/PlainSocketImpl.java:195:-1
    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58)
    at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:360)
    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:403)
    at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:69)
    at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:48)
    at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:277)
    at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258)
    at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:382)
    at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:103)
    at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4638)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5294)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1566)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1556)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)

你可能感兴趣的:(ssh)