struts2 错误:Dispatcher initialization failed java.lang.RuntimeException

严重: Dispatcher initialization failed java.lang.RuntimeException: java.lang.reflect.InvocationTargetException处理方法:

1、核对lib包    commons-fileupload-1.2.1.jar,

                      commons-io-1.3.2.jar

                      commons-logging-1.0.4.jar

                      freemarker-2.3.16.jar

                      ognl-3.0.jar

                     struts2-core-2.2.1.jar

                     xwork-core-2.2.1.jar

注意2.1以前是没有commons-fileupload-1.2.1.jar。

2、如果struts2版本是2.1以前web.xml配置过滤器的时候应该是这样:<filter-class>org.apache.struts2.dispatcher.FilterDispatcher </filter-class>         

     如果struts2 版本是2.1以上web.xml配置 <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>

3、 在使用struts-2.2.1时,需要引入javassist-3.7.ga.jar,

4、使用struts2.3以上的版本需要依赖更多的包,具体看tomcat启动出错情况

posted @ 2013-08-15 17:13  等风来。。  Views(299)  Comments(0Edit  收藏  举报
------------------------------------------------------------------------------------------------------------ --------------- 欢迎联系 x.guan.ling@gmail.com--------------- ------------------------------------------------------------------------------------------------------------