struts2的配置问题,求高手指点
在使用struts2的时候,启动时报错,调了一天,在网上搜集了些解决方案都没有解决,求高手指点。
环境配置情况如下:
工程的lib包(公司不能发图片):
WEB-INF\lib\antlr-2.7.2.jar
WEB-INF\lib\commons-fileupload-1.2.2.jar
WEB-INF\lib\commons-io-2.0.1.jar
WEB-INF\lib\commons-lang3-3.1.jar
WEB-INF\lib\commons-logging-api-1.1.jar
WEB-INF\lib\freemarker-2.3.19.jar
WEB-INF\lib\javassist-3.11.0.GA.jar
WEB-INF\lib\ognl-3.0.6.jar
WEB-INF\lib\struts2-core-2.3.8.jar
WEB-INF\lib\struts2-json-plugin-2.3.8.jar
WEB-INF\lib\xwork-core-2.3.8.jar
web.xml filter配置如下:
<filter>
<filter-name>struts</filter-name>
<filter-class>
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>struts</filter-name>
<url-pattern>*.action</url-pattern>
</filter-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
在src\struts.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
<package name="bme" extends="struts-default,json-default" namespace="/">
<action name="networkTopology" class="*****Service" method="***">
<result name="fail"></result>
<result type="json">
<param name="root">******</param>
</result>
</action>
</package>
</struts>
错误信息:
严重: Dispatcher initialization failed
Unable to load configuration. - [unknown location]
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70)
。。。。
Caused by: Unable to load file:/D:/01_code/mobile/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/msp/WEB-INF/classes/struts.xml - [unknown location]
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:1022)
。。。。。
2014-7-27 20:44:50 org.apache.catalina.core.StandardContext filterStart