请教一个struts问题,快崩溃了

来源:百度知道 编辑:UC知道 时间:2024/06/29 02:51:19
Unable to locate configuration files of the name /WEB-INF/classes/struts-config.xml, skipping
我得第一个struts程序就跑步起了,几天了都弄不好,崩溃了!!!高手赐教!!
struts.xml
<?xml version="1.0" encoding="UTF-8" ?>
<!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.enable.DynamicMethodInvocation" value="false" />
<constant name="struts.devMode" value="false" />

<include file="example.xml"/>

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

, skipping ??
struts-config.xml必然有写错的地
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
里面写的是/WEB-INF/classes/struts-config.xml这个url嘛。
有问题HI我,发我struts-config.xml一看就搞定

struts-config.xml不是位于WEB-INF/下的啊~~

很明显,肯定是你的struts-config.xml中配置有问题.

第一 strtus这个框架的配置文件必须命名为struts-config.xml,希望你能检查一下配置文件的文件名,

第二 struts-config.xml 放在项目的WEB-INF文件夹下即可,

如果都无误但是又出现错误的话,建议你去下个配置文件模板,把别人的配置信息删了,文件信息保留下来作为自己的配置文件即可,在这个文件下配置你需要的信息,不会有错的

建议使用myeclipse开发,添加struts支持时自动创建配置