代码如下:
<?xml version="1.0" encoding="UTF-8"?>
<!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> //报错行
<data-sources />
<form-beans >
<form-bean name="loginForm" type="com.ssh.struts.form.LoginForm" />
</form-beans>
<action-mappings />
<action
attribute="loginForm"
input="/login.jsp"
name="loginForm"
path="/login"
scope="request"
type="com.ssh.struts.action.LoginAction" >
<forward name="suc" path="/index.jsp" />
</action>
</struts-config>报错提示:The content of element type "struts-config" must match "(displayname?,description?,datasources?,form-beans?,global-exceptions?,global-forwards?,action-mappings?,controller?,message-resources*,plug-in*)".
<?xml version="1.0" encoding="UTF-8"?>
<!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> //报错行
<data-sources />
<form-beans >
<form-bean name="loginForm" type="com.ssh.struts.form.LoginForm" />
</form-beans>
<action-mappings />
<action
attribute="loginForm"
input="/login.jsp"
name="loginForm"
path="/login"
scope="request"
type="com.ssh.struts.action.LoginAction" >
<forward name="suc" path="/index.jsp" />
</action>
</struts-config>报错提示:The content of element type "struts-config" must match "(displayname?,description?,datasources?,form-beans?,global-exceptions?,global-forwards?,action-mappings?,controller?,message-resources*,plug-in*)".
解决方案 »
- 新手请教关于jsp的一些基础知识
- svf的问题,知道的都进来下哈~~
- 表单的问题
- 我使用了一个判别语句来设置session,不同的条件有不同的session,但我该如何判断某一session为某一值呢?
- 启动了tomcat,怎么.jsp文件会提示我下载?
- 怎样extends同一个包下面类?
- 为什么只有一个Hello!?
- 我用Jbuilder6.0 作为开发环境,如何启动WEB SERVER 服务器?很菜的问题,刚学不知道如何,请各位不要笑呀
- 在IE浏览器上,点击回车键页面上的input输入的值被清空了
- 关于用户注册信息验证
- 为什么我的一个TXT文件用记事本打开没有问题,用写字板就乱码呢
- 关于hibernate的一个小问题,大家帮忙看一下
<form-bean name="loginForm" type="com.ssh.struts.form.LoginForm" />
</form-beans>这几句,有问题。
你应该把</form-beans>去掉
</form-beans>
<global-exceptions />
<action-mappings>
<action></action>这个区段要放在<action-mappings></action-mappings>之间才行
你试下吧 应该就是这两个问题 希望这个能帮到你
<action-mappings />
<action
attribute="loginForm"
input="/login.jsp"
name="loginForm"
path="/login"
scope="request"
type="com.ssh.struts.action.LoginAction" >
<forward name="suc" path="/index.jsp" />
</action>你的这个地方应该改成
</form-beans>
<global-exceptions />
<action-mappings>
<action
attribute="loginForm"
input="/login.jsp"
name="loginForm"
path="/login"
scope="request"
type="com.ssh.struts.action.LoginAction" >
<forward name="suc" path="/index.jsp" />
</action>
</action-mappings>应该是这样子才对 检查下吧