struts-config.xml报错是什么问题

来源:百度知道 编辑:UC知道 时间:2024/06/20 10:47:35
<?xml version="1.0" encoding="gbk"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN" "http://struts.apache.org/dtds/struts-config_1_2.dtd">

<struts-config>显示错在这句
<form-beans>
<form-bean name="loginForm" type="LoginForm"/>
</form-beans>
<data-sources />
<global-exceptions />
<global-forwards />
<action-mappings>
<action name="loginForm" path="/login" type="LoginAction">
<forward name="login" path="/index.jsp"></forward>
<forward name="success" path="/success.jsp"></forward>
</action>
</action-mappings><

struts配置文件要符合DTD规则,第一项是<data-sources />你把<form-beans/>写在它前头当然报错了,把他俩换换位置。

type中你的有你类的路径,

这是你自己写的吧,不是电脑自动生成的吧

能把你的错误内容贴出来不?
估计应该是LoginForm应该放到一个包下
配置的时候写上包名