前端系統(tǒng)-備忘1

          Posted on 2008-12-08 11:18 Robert Su 閱讀(236) 評(píng)論(0)  編輯  收藏 所屬分類(lèi): Java

           

          <?xml version="1.0" encoding="UTF-8"?>
          <web-app>
           <display-name>系統(tǒng)</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過(guò)早關(guān)閉,因?yàn)橛械腶ction會(huì)通過(guò)ajax動(dòng)態(tài)調(diào)用 -->
           <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防止內(nèi)存泄露 -->
           <listener>
            <listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class>
           </listener>
           <!-- session超時(shí)定義,單位為分鐘 -->
           <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

          主站蜘蛛池模板: 库伦旗| 望奎县| 霍州市| 杭锦后旗| 秦皇岛市| 叙永县| 兴安盟| 兴化市| 东至县| 涟源市| 双鸭山市| 盐亭县| 巨野县| 罗定市| 汤原县| 伊金霍洛旗| 隆化县| 昌都县| 泰和县| 任丘市| 东安县| 金塔县| 汕头市| 宝应县| 富宁县| 融水| 桦南县| 绩溪县| 辉县市| 莎车县| 西丰县| 新昌县| 谷城县| 上栗县| 虞城县| 梁平县| 新兴县| 嘉善县| 奉贤区| 长宁区| 锡林郭勒盟|