---
title: " struts2.1.x 升级到struts2.3.x "
author: "paper"
date: "2013-06-07T19:41:25Z"
tags: []
categories: ["开源软件"]
slug: "struts2-1-x-struts2-3-x"
draft: false
lastmod: "2013-06-09T16:16:00Z"
id: 1884110
url: "https://paper.iteye.com/blog/1884110"
---

由于 struts2 2.1.8.1 的版本存在漏洞，需要升级到2.3.14.3

升级所需修改的包删除

struts2-convention-plugin-2.1.x.1.jar

struts2-core-2.1.x.1.jar

struts2-embeddedjsp-plugin-2.1.x.1.jar

struts2-json-plugin-2.1.x.1.jar

struts2-spring-plugin-2.1.x.1.jar

xwork-core-2.1.8.jar

ognl-2.7.3.jar

 

添加

commons-lang3-3.1.jar

javassist-3.11.0.GA.jar

ognl-3.0.6.jar

struts2-convention-plugin-2.3.14.3.jar

struts2-core-2.3.14.3.jar

struts2-embeddedjsp-plugin-2.3.14.3.jar

struts2-json-plugin-2.3.14.3.jar

struts2-spring-plugin-2.3.14.3.jar

xwork-core-2.3.14.3.jar

 

若将asm.jar改为asm-3.3.jar 

需添加asm-tree-3.3.jar

asm-commons-3.3.jar

同时修改cglib-2.1.3为cglib-2.2

 

同时将：

&lt;filter-class&gt;org.apache.struts2.dispatcher.FilterDispatcher  

&lt;/filter-class&gt; 

修改为

&lt;filter-class&gt;org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter  

&lt;/filter-class&gt;