structs-报错01-Document is invalid: no grammar found
来源:未知 责任编辑:责任编辑 发表时间:2015-03-01 01:35 点击:次
一时手贱,把structs-config.xml文件中的一段话删了,结果老是报错。
报错内容:Document is invalid: no grammar found
[html]
<?xml version="1.0" encoding="UTF-8"?>
<strong><span style="color:#ff0000;"><!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Tiles Configuration 1.3//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_3.dtd"></span></strong>
<struts-config>
<form-beans>
<form-bean name="helloForm" type="com.mars.demo01.structs01.form.HelloForm" />
</form-beans>
<!-- 用于配置ActionForm -->
<global-exceptions /><!-- 用于配置全局异常 -->
<global-forwards /><!-- 用于配置全局跳转 -->
<action-mappings>
<action attribute="helloForm" input="/demo01/demo01_hello.jsp"
name="helloForm" path="/demo01/demo01_hello" scope="request"
type="com.mars.demo01.structs01.action.HelloAction" cancellable="true">
<forward name="show" path="/demo01/demo01_hello.jsp"></forward>
</action> www.2cto.com
</action-mappings>
<!-- 用于配置Action -->
<message-resources parameter="com.mars.demo01.structs01.ApplicationResources" />
</struts-config>
然后恢复原样,结果又好了,所以这句话是不能删的。在网上查了查,发现这是一个定义格式的东东。怎么弄的这么麻烦。
报错内容:Document is invalid: no grammar found
[html]
<?xml version="1.0" encoding="UTF-8"?>
<strong><span style="color:#ff0000;"><!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Tiles Configuration 1.3//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_3.dtd"></span></strong>
<struts-config>
<form-beans>
<form-bean name="helloForm" type="com.mars.demo01.structs01.form.HelloForm" />
</form-beans>
<!-- 用于配置ActionForm -->
<global-exceptions /><!-- 用于配置全局异常 -->
<global-forwards /><!-- 用于配置全局跳转 -->
<action-mappings>
<action attribute="helloForm" input="/demo01/demo01_hello.jsp"
name="helloForm" path="/demo01/demo01_hello" scope="request"
type="com.mars.demo01.structs01.action.HelloAction" cancellable="true">
<forward name="show" path="/demo01/demo01_hello.jsp"></forward>
</action> www.2cto.com
</action-mappings>
<!-- 用于配置Action -->
<message-resources parameter="com.mars.demo01.structs01.ApplicationResources" />
</struts-config>
然后恢复原样,结果又好了,所以这句话是不能删的。在网上查了查,发现这是一个定义格式的东东。怎么弄的这么麻烦。
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>