zoukankan      html  css  js  c++  java
  • 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启动出错情况

  • 相关阅读:
    混杂模式
    消息队列学习
    item21
    消息队列改写
    socket select模型
    EffectiveC++ Item11
    How to read a PCap file from Wireshark with C++
    winsock select学习
    线程安全与可重入函数
    process explorer 查看句柄或者加载的dll
  • 原文地址:https://www.cnblogs.com/yuyutianxia/p/3260104.html
Copyright © 2011-2022 走看看