菜鸟的struts问题二

asdmonster 2004-02-13 10:17:11
我写的一个简单的struts,但是发布的时候tomcat解析struts_configure.xml就出错了,我的struts_configure.xml如下:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
<struts-config>
<form-beans>
<form-bean name="firstForm"
type="test.struts.FirstForm"/>
</form-beans>
<global-forwards>
<forward
name="welcome"
path="/Welcome.do"/>
^^^^^
报错一定位出(原来有若干注释)


</global-forwards>
<action-mappings>
<action
path="/Welcome"
type="org.apache.struts.actions.ForwardAction"
parameter="/pages/Welcome.jsp"/>
<action path="/doOne"
type="test.struts.FirstAction"
name="firstForm"
scope="session" >
<forword name="success" path="success1.jsp"/>
<forward name="fail" path="fail1.jsp"/>
</action>
^^^^^
报错二定位处

</action-mappings>
<controller
processorClass="org.apache.struts.tiles.TilesRequestProcessor"/>
<message-resources parameter="resources.application"/>
<plug-in className="org.apache.struts.tiles.TilesPlugin" >
<set-property property="definitions-config"
value="/WEB-INF/tiles-defs.xml" />
<set-property property="moduleAware" value="true" />
<set-property property="definitions-parser-validate" value="true" />
</plug-in>
<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
<set-property
property="pathnames"
value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
</plug-in>
</struts-config>

=============================================================
报错一:
严重: Parse Error at line 229 column 57: Element type "forword" must be declared.
org.xml.sax.SAXParseException: Element type "forword" must be declared.

报错二:
严重: Parse Error at line 231 column 18: The content of element type "action" must match "(icon?,display-name?,description?,set-property*,exception*,f
orward*)".
org.xml.sax.SAXParseException: The content of element type "action" must match "(icon?,display-name?,description?,set-property*,exception*,forward*)".

我用ie打开没有问题呀?谁能帮看看,是哪里错了?不胜感激。



...全文
44 33 打赏 收藏 转发到动态 举报
写回复
用AI写文章
33 条回复
切换为时间正序
请发表友善的回复…
发表回复

67,513

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧