Struts2.0和Struts2.1的区别

Struts2.1.x终于推出正式版了,迫不急待地下了试试(读者可以从http://struts.apache.org/download.cgi#struts216下载)。从这个版本所带的jar包上看丰富了很多。很多jar包的版本也有所提升。

下载后按着Struts

2.0.14版的方法进行配置,将我以前做的一些程序移植到Struts2.1.6上,启动Tomcat,晕晕,竟然抛出异常说无法装载org.apache.struts2.dispatcher.multipart.MultiPartRequest,看一下异常信息,提示没找到org.apache.commons.fileupload.RequestContext类,但在struts2.0.14中并不需要这个类。于是搜索struts2.1.6带的jar包,发现RequestContext类在commons-fileupload-1.2.1.jar包中,但struts2.0.14并没有这个包。可能是struts2.1.6对文件上传功能的改进,因此,要想正常使用struts2.1.6,至少需要如下6个jar包:

struts2-core-2.1.6.jar

freemarker-2.3.13.jar

commons-logging-1.0.4.jar

ognl-2.6.11.jar

xwork-2.1.2.jar

commons-fileupload-1.2.1.jar

...........

转载于:http://hi.baidu.com/happynew12/blog/item/41fea113b2a7500d213f2ee1.html

相关推荐