前端系統-備忘1

          Posted on 2008-12-08 11:18 Robert Su 閱讀(239) 評論(0)  編輯  收藏 所屬分類: Java

           

          <?xml version="1.0" encoding="UTF-8"?>
          <web-app>
           <display-name>系統</display-name>
           <context-param>
            <param-name>log4jConfigLocation</param-name>
            <param-value>/WEB-INF/log4j.properties</param-value>
           </context-param>
           <!-- ContextConfigLocation -->
           <context-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>/WEB-INF/vbm_action.xml,/WEB-INF/vbm_hibernate.xml,/WEB-INF/vbm_dao.xml</param-value>
           </context-param>

           <!-- 著名 Character Encoding filter -->

           <filter>
            <filter-name>encodingFilter</filter-name>
            <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
            <init-param>
             <param-name>encoding</param-name>
             <param-value>UTF-8</param-value>
            </init-param>
           </filter>
           <filter>
            <filter-name>struts2</filter-name>
            <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
            <init-param>
             <param-name>config</param-name>
             <param-value>struts-default.xml,struts-plugin.xml,struts.xml,struts_books.xml</param-value>
            </init-param>
           </filter>

           <filter-mapping>
            <filter-name>encodingFilter</filter-name>
            <url-pattern>/*</url-pattern>
           </filter-mapping>
           <filter-mapping>
            <filter-name>struts2</filter-name>
            <url-pattern>/*</url-pattern>
           </filter-mapping>
           <!-- 加入jpaFilter,是為了不讓hibernate的session過早關閉,因為有的action會通過ajax動態調用 -->
           <filter>
            <filter-name>jpaFilter</filter-name>
            <filter-class>org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter</filter-class>
            <init-param>
             <param-name>entityManagerFactory</param-name>
             <param-value>entityManagerFactory</param-value>
            </init-param>
           </filter>
           <filter-mapping>
            <filter-name>jpaFilter</filter-name>
            <url-pattern>*.htm</url-pattern>
           </filter-mapping>
           <!-- Listener contextConfigLocation -->
           <listener>
            <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
           </listener>
           <!-- Listener log4jConfigLocation -->
           <listener>
            <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
           </listener>
           <!-- Spring 刷新Introspector防止內存泄露 -->
           <listener>
            <listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class>
           </listener>
           <!-- session超時定義,單位為分鐘 -->
           <session-config>
            <session-timeout>10</session-timeout>
           </session-config>
           <!-- The Welcome File List -->
           <welcome-file-list>
            <welcome-file>index.html</welcome-file>
           </welcome-file-list>
          </web-app>

          posts - 103, comments - 104, trackbacks - 0, articles - 5

          Copyright © Robert Su

          主站蜘蛛池模板: 锡林郭勒盟| 济阳县| 茶陵县| 乌鲁木齐县| 衡阳县| 黄浦区| 成都市| 苗栗县| 专栏| 株洲县| 襄汾县| 高州市| 名山县| 龙里县| 安仁县| 隆回县| 漯河市| 宁阳县| 朝阳市| 栖霞市| 永丰县| 竹北市| 衡阳县| 寿阳县| 霍城县| 苍溪县| 涟水县| 南郑县| 太仓市| 新河县| 永春县| 吉木乃县| 邵阳市| 庆城县| 五河县| 应城市| 梁河县| 仁布县| 漳浦县| 灵宝市| 太康县|