Struts-cong.xml 配置文件讲解
〖 作者:不详 〗〖 大小:1k 〗〖 发布日期:2005-08-22 〗〖 浏览:1388 〗
Struts 的核心是 struts-cong.xml 配置文件,在这个文件里描述了所有的 Struts 组件。
在这里包括配置主要的组件及次要的组件,下面是 struts-cong.xml 包含主要元素的内容:
一、 struts-cong.xml 的主要元素:
<?xmlversion=”1.0”encoding=”ISO-8859-1”?>
<!DOCTYPEstruts-congPUBLIC"-//ApacheSoftwareFoundation//DTDStrutsConguration1.1//EN"
"http://jakarta.apache.org/struts/dtds/struts-cong_1_1.dtd">
<struts-cong>
<data-sources>
<data-source>
</data-source>
</data-sources>
<form-beans>
<form-bean/>
</form-beans>
<global-forwards>
<forward/>
</global-forwards>
<action-mappings>
<action/>
</action-mappings>
<controller/>
<message-resources/>
<plug-in/>
</struts-cong>
注意:以上各元素的顺序是非常重要的,你的 struts-cong.xml 配置文件必须按照这个顺序进行配置,否
则在你的容器启动的时候就会出错。