Dispatcher initialization failed问题的解决方法

严重: Dispatcher initialization failed java.lang.RuntimeException: java.lang.reflect.InvocationTargetException处理方法:一、核对lib包    commons-fileupload-1.2.1.jar, java

                      commons-io-1.3.2.jar web

                      commons-logging-1.0.4.jar apache

                      freemarker-2.3.16.jar tomcat

                      ognl-3.0.jar app

                     struts2-core-2.2.1.jar spa

                     xwork-core-2.2.1.jar xml

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

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

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

三、 在使用struts-2.2.1时,须要引入javassist-3.7.ga.jar,而这个在struts-2.2.1\lib下是没有的,须要在struts-2.2.1\apps\struts2-blank-2.2.1.war下的lib中找。

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

相关文章
相关标签/搜索