小编Rah*_*are的帖子

严重:异常启动过滤器struts2无法加载配置. - bean - jar:file:struts2-core-2.2.3.jar!/struts-default.xml:29:72

在struts.xml

struts.xml文件我写的这个

    <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
        "http://struts.apache.org/dtds/struts-2.0.dtd">

    <struts>
        <constant name="struts.devMode" value="true" />

        <package name="default" extends="struts-default" namespace="/">

        </package>
    </struts>
Run Code Online (Sandbox Code Playgroud)

web.xml文件我写的这个

    <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
        http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
        <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>
        <welcome-file-list>
            <welcome-file>index.jsp</welcome-file>
        </welcome-file-list>
    </web-app>
Run Code Online (Sandbox Code Playgroud)

我接受了jar文件 web-inf/lib

  • 公地的BeanUtils-1.7.0.jar
  • 公地集合-3.2.1.jar
  • 公共沼气池-1.8.jar
  • 公地文件上传-1.2.2.jar
  • 公地IO-2.0.1.jar
  • 公地郎2.5.jar
  • 共享记录-1.1.1.jar
  • 公地验证-1.3.1.jar
  • freemarker的-2.3.16.jar
  • OGNL-3.0.1.jar
  • Struts2的核心 - 2.2.3.jar
  • XWork的核心 - 2.2.3.jar

当我要在eclispe中运行时,这将会出错

错误

>>>SEVERE: Dispatcher initialization failed
>>>Unable to load configuration. - bean - jar:file:/F:/m/.metadata/.me_tcat/webapps/project/WEB-INF/lib/struts2-core-2.2.3.jar!/struts-default.xml:29:72
>>> at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58)
>>> at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:374) …
Run Code Online (Sandbox Code Playgroud)

struts2 java-ee

2
推荐指数
2
解决办法
3万
查看次数

标签 统计

java-ee ×1

struts2 ×1