1、在大部分应用里,随着应用规模的增加,系统中Action的数量会大量增加,导致struts.xml配置文件变得臃肿。
为了避免struts.xml文件过于庞大、臃肿,为提高struts.xml文件的可读性,我们可以将一个struts.xml配置文件分解成多个配置文件,然后在struts.xml文件中包含其他配置文件
2、可以在<package>标签中,使用<include>标签来引入其他的struts_xx.xml的配置文件。例如:
<struts>
<!-- 引入其他的配置文件 -->
<include file="com/user/struts_user.xml" />
<include file="com/customer/struts_customer.xml" />
</struts>
3、值得注意:file的值为 struts_xx.xml的全路径