前端系統-備忘1

          Posted on 2008-12-08 11:18 Robert Su 閱讀(236) 評論(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

          主站蜘蛛池模板: 长武县| 昌宁县| 兰州市| 洛川县| 东明县| 元阳县| 外汇| 时尚| 广西| 揭阳市| 纳雍县| 禹州市| 保康县| 龙海市| 大兴区| 邻水| 潞城市| 中江县| 闸北区| 彝良县| 黑龙江省| 万盛区| 嘉峪关市| 栖霞市| 基隆市| 伊春市| 保靖县| 田东县| 大城县| 阿鲁科尔沁旗| 彩票| 花莲县| 天水市| 伊吾县| 鄯善县| 翁源县| 安阳县| 静安区| 和田县| 上饶市| 家居|