struts2中配置多个struts.xml配置文件

来源:互联网 发布:云熙家具软件 编辑:程序博客网 时间:2024/05/17 09:20

  一般来说我们在做开发的时候,是一个团队,我们可能会按照人来分不同的模块,每个人维护自己不同的struts配置文件,但在最后整合的时候,一定要把各人所用到的配置文件都整合进来,这里有一个方法,用是在你写的主要的配置文件中把别的配置文件导进来,

  在struts.xml中加入下面的文字就可以解决了

  <include file="struts-default.xml">

  < include file="struts_helei.xml" />

  <include file="struts_zou.xml" /><include file="struts-default.xml">

  <include file="struts_helei.xml"><include file="struts_zou.xml"><include file="struts-default.xml">

  <include file="struts_helei.xml">

  <include file="struts_zou.xml"></include></include></include></include></include></include><include file="struts-default.xml">

  <include file="struts_helei.xml">

  <include file="struts_zou.xml"></include></include>

  </include><include file="struts_mu.xml"></include>

0 0