struts2怎么升级到2.3.15.1版本,Struts2升2.3.15.1后tomcat启动不了


原文地址:http://hi.baidu.com/firefly0927/item/63fd418acf20b823110ef31b



如果是把下载来的新jar包替换掉原来的jar包,tomcat会启动不了,


正确的升级方式如下


commons-lang3-3.1.jar (这个是新加)(并保留原来的commons-lang-2.4.jar或是2.6)

javassist-3.11.0.GA.jar(新加)

ognl-3.0.6.jar(替换)

struts2-core-2.3.15.1.jar(替换)

xwork-core-2.3.15.1.jar(替换)

其它的jar包不用变



struts2-core-2.1.8.jar                      =》   struts2-core-2.3.15.1.jar 

struts2-jasperreports-plugin-2.1.8.jar      =》   struts2-jasperreports-plugin-2.3.15.1.jar 

struts2-json-plugin-2.1.8.jar               =》   struts2-json-plugin-2.3.15.1.jar 

struts2-spring-plugin-2.1.8.jar             =》   struts2-spring-plugin-2.3.15.1.jar 

struts2-tiles-plugin-2.1.8.jar              =》   struts2-tiles-plugin-2.3.15.1.jar 

velocity-1.5.jar                            =》   velocity-1.6.4.jar 

xwork-core-2.1.6.jar                        =》   xwork-core-2.3.15.1.jar 

commons-beanutils-1.7.0.jar                 =》   commons-beanutils-1.8.0.jar 

commons-digester-1.8.jar                    =》   commons-digester-2.0.jar 

commons-fileupload-1.2.1.jar                =》   commons-fileupload-1.3.jar 

commons-io-1.4.jar                          =》   commons-io-2.0.1.jar 

commons-logging-1.0.4.jar                   =》   commons-logging-1.1.3.jar 

freemarker.jar                              =》   freemarker-2.3.19.jar 

google-collect-1.0.jar                      =》   google-collections-1.0.jar 

ognl-2.6.9.jar                              =》   ognl-3.0.6.jar 

(追加)                                      =》   commons-lang3-3.1.jar *包依赖(xwork->lang3等) 

(追加)                                      =》   javassist-3.11.0.GA.jar *包依赖(struts2-core->ognl->javassit) (追加)                                      =》   struts2-jfreechart-plugin-2.3.15.1 (与struts2整合)


★ web.xml 修改
去除 ActionContextCleanUp 过滤器。被org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter替代。

org.apache.struts2.dispatcher
Class FilterDispatcher
Deprecated. Since Struts 2.1.3, use StrutsPrepareAndExecuteFilter instead or StrutsPrepareFilter and StrutsExecuteFilter if needing using the ActionContextCleanUp filter in addition to this one

org.apache.struts2.dispatcher 
Class ActionContextCleanUp
Deprecated. Since Struts 2.1.3, use StrutsPrepareFilter and StrutsExecuteFilter to use other Servlet filters that need access to the ActionContext

ActionContextCleanUp也是自2.1.3开始由StrutsPrepareFilter和StrutsExecuteFilter的组合替代。
StrutsPrepareAndExecuteFilter是StrutsPrepareFilter和StrutsExecuteFilter的组合

你可能感兴趣的:(struts2怎么升级到2.3.15.1版本,Struts2升2.3.15.1后tomcat启动不了)