zoukankan      html  css  js  c++  java
  • java.lang.ClassNotFoundException:org.apache.struts2.dispatcher.FilterDispatcher

    老版本的Struts2升级,启动报的错。

    org.apache.struts2.dispatcher.FilterDispatcher 是web.xml中对struts2  2.2版本的接入点的类。

    在Struts2  2.3版本,应该是 org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter

    在Struts2  2.5版本,应该是 org.apache.struts2.dispatcher.FilterDispatcher

    如下:

    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns="http://java.sun.com/xml/ns/javaee" 
       xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
       xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
       http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
       id="WebApp_ID" version="3.0">
       
       <display-name>Struts 2</display-name>
       <welcome-file-list>
          <welcome-file>index.jsp</welcome-file>
       </welcome-file-list>
       <filter>
          <filter-name>struts2</filter-name>
          <filter-class>
                  <!--2.5版本的写法 -->
             org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter
          </filter-class>
       </filter>
    
       <filter-mapping>
          <filter-name>struts2</filter-name>
          <url-pattern>/*</url-pattern>
       </filter-mapping>
    </web-app>
  • 相关阅读:
    全球化编码
    linuxGrep命令
    Xcode-插件所在路径
    多控制器间数据传递
    触摸事件
    IOS事件处理
    事件监听的三种方法
    UITabBarController
    聊天布局
    Info.plist:项目配置文件
  • 原文地址:https://www.cnblogs.com/bpjj/p/12025314.html
Copyright © 2011-2022 走看看