struts1.2有多个config和多个contextConfigLocation在web.xml中如何设置

struts1.2中有多个struts-config 和多个contextConfigLocation在项目中的web.xml当中是这样做的

 <!-- struts设置 -->
  <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>com.chinaway.web.struts.action.ActionServlet</servlet-class>
    <init-param>
      <param-name>config</param-name>
      <param-value>
	      /WEB-INF/conf/struts-config.xml,
	      /WEB-INF/conf/struts-config-agent.xml,
	      /WEB-INF/conf/struts-config-onlineserve.xml,
	      /WEB-INF/conf/struts-config-drawing.xml,
	      /WEB-INF/conf/struts-config-fund.xml,
	      /WEB-INF/conf/struts-config-question.xml,
	      /WEB-INF/conf/struts-config-other.xml,
	      /WEB-INF/conf/struts-config-member.xml,
	      /WEB-INF/conf/struts-config-sign.xml
      </param-value>
    </init-param>
    <init-param>
      <param-name>debug</param-name>
      <param-value>3</param-value>
    </init-param>
    <init-param>
      <param-name>detail</param-name>
      <param-value>3</param-value>
    </init-param>
    <load-on-startup>0</load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
  </servlet-mapping>
  <!-- applicationContext -->
 <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>
    	/WEB-INF/classes/applicationContext.xml
    	/WEB-INF/classes/applicationContext_zcdb.xml
    	/WEB-INF/classes/applicationContext_forecast.xml
    	/WEB-INF/classes/com/chinaway/applicationContext.xml 
		/WEB-INF/classes/com/agent/applicationContext.xml 
		/WEB-INF/classes/com/chess/applicationContext-server.xml
	    /WEB-INF/classes/com/questionnaire/applicationContext.xml
	    /WEB-INF/classes/com/other/applicationContext.xml
	    /WEB-INF/classes/com/member/applicationContext.xml
	    /WEB-INF/classes/com/sign/applicationContext.xml
	    /WEB-INF/classes/com/endow/applicationContext.xml
	</param-value>
  </context-param>





你可能感兴趣的:(xml,Web,struts)