web.xml同时加载多个Structs,Spring文件

    技术2022-06-27  50

    date:2010-12-15 author:heguikun

    <!-- 加载多个以applicationContext开头的或者以Spring结尾的Spring文件 -->  <context-param>  <param-name>contextConfigLocation</param-name>  <param-value>/WEB-INF/applicationContext*.xml,/WEB-INF/*Spring.xml</param-value> </context-param> <listener>  <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener>

     

     <!-- 当服务器启动的时候启动struts容器 -->  <servlet>    <servlet-name>action</servlet-name>    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>    <init-param>      <param-name>config</param-name>      <param-value>                  /WEB-INF/struts-config.xml,                  /WEB-INF/heguikunStruts.xml,                   /WEB-INF/LhStruts.xml,                   /WEB-INF/LjlStruts.xml,                   /WEB-INF/PbStruts.xml,                    /WEB-INF/QxStruts.xml,                   /WEB-INF/ZwlStruts.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>

     

    <!-- 页面访问 拦截器(权限) -->    <!--<filter>    <filter-name>PageAuthFilter</filter-name>    <filter-class>utils.PageAuthFilter</filter-class>    </filter>    <filter-mapping>    <filter-name>PageAuthFilter</filter-name>    <url-pattern>*.jsp</url-pattern>    </filter-mapping>

     <!--添加监听器 ,在程序启动时初始化 spring --> <listener>  <listener-class>   org.springframework.web.context.ContextLoaderListener  </listener-class> </listener>


    最新回复(0)