java.lang.ClassNotFoundException:org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter在构建普通的struts登录应用程序时

问题描述 投票:0回答:1

在构建简单的Struts应用程序时解决此问题

当我的另一个struts应用程序运行正常时,所有的jar文件都已正确导入

Web.xml

<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://java.sun.com/xml/ns/javaee" xmlns:jsp="http://java.sun.com/xml/ns/javaee/jsp"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    id="WebApp_ID" version="2.5">

    <display-name>WB AOS Data Admin App</display-name>

    <filter>
    <filter-name>struts2</filter-name>
    <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
  </filter>
  <filter-mapping>
    <filter-name>struts2</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>
java maven struts2 struts
1个回答
0
投票

有时,其他导入的依赖项可能导致此类错误。尝试减少到​​Struts 2应用程序所需的最低依赖关系。

© www.soinside.com 2019 - 2024. All rights reserved.