方槍槍的java世界

          不要因為風雨飄落就停止了你的腳步,真正的得失就在你的心中。 做喜歡做的事,不輕言放棄!

          02 整合spring3和mybatis進行web開發之web_xml(使用了spring_security)

          <?xml version="1.0" encoding="UTF-8"?>
          <web-app xmlns:xsi=" xmlns="http://java.sun.com/xml/ns/javaee  version="2.5">

           <display-name>Tianhe Framework Example Application</display-name>

           <!--  -->
           <context-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>
             classpath:META-INF/spring/global.common.xml  
             classpath:META-INF/spring/global.datasource.xml
             classpath:META-INF/spring/global.security.xml  
            </param-value>
           </context-param>

           <context-param>
            <param-name>webAppRootKey</param-name>
            <param-value>example</param-value>
           </context-param>

           <context-param>
            <param-name>log4jConfigLocation</param-name>
            <param-value>classpath:/log4j.properties</param-value>
           </context-param>

           <context-param>
            <param-name>log4jRefreshInterval</param-name>
            <param-value>60000</param-value>
           </context-param>

           <listener>
            <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
           </listener>

           <listener>
            <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
           </listener>

           <listener>
            <listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class>
           </listener>

           <filter>
            <filter-name>characterEncodingFilter</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>
            <init-param>
             <param-name>forceEncoding</param-name>
             <param-value>true</param-value>
            </init-param>
           </filter>
           <filter-mapping>
            <filter-name>characterEncodingFilter</filter-name>
            <url-pattern>/*</url-pattern>
           </filter-mapping>

           <filter>
            <filter-name>CommonWebFilter</filter-name>
            <filter-class>com.tianhe.frm.web.CommonWebFilter</filter-class>
            <init-param>
             <param-name>interceptors</param-name>
             <param-value>com.tianhe.frm.web.WebContextFilterInterceptor</param-value>
            </init-param>
           </filter>
           <filter-mapping>
            <filter-name>CommonWebFilter</filter-name>
            <url-pattern>/*</url-pattern>
           </filter-mapping>

           <filter>
            <filter-name>securityFilter</filter-name>
            <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
            <init-param>
             <param-name>targetBeanName</param-name>
             <param-value>springSecurityFilterChain</param-value>
            </init-param>
           </filter>
           <filter-mapping>
            <filter-name>securityFilter</filter-name>
            <url-pattern>/*</url-pattern>
           </filter-mapping>

           <servlet>
            <servlet-name>dispatcher</servlet-name>
            <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
            <init-param>
             <param-name>contextConfigLocation</param-name>
             <param-value>/WEB-INF/dispatcher-servlet.xml</param-value>
            </init-param>
            <load-on-startup>1</load-on-startup>
           </servlet>
           <servlet-mapping>
            <servlet-name>dispatcher</servlet-name>
            <url-pattern>*.do</url-pattern>
           </servlet-mapping>

           <!--
            <servlet> <servlet-name>remoting</servlet-name>
            <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
            <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping>
            <servlet-name>remoting</servlet-name>
            <url-pattern>/httpinvoker/*</url-pattern> </servlet-mapping>
            <servlet-mapping> <servlet-name>remoting</servlet-name>
            <url-pattern>/burlap/*</url-pattern> </servlet-mapping>
            <servlet-mapping> <servlet-name>remoting</servlet-name>
            <url-pattern>/hessian/*</url-pattern> </servlet-mapping>
           -->

           <mime-mapping>
            <extension>doc</extension>
            <mime-type>application/msword</mime-type>
           </mime-mapping>
           <mime-mapping>
            <extension>xls</extension>
            <mime-type>application/vnd.ms-excel</mime-type>
           </mime-mapping>
           <mime-mapping>
            <extension>ppt</extension>
            <mime-type>application/vnd.ms-powerpoint</mime-type>
           </mime-mapping>
           <mime-mapping>
            <extension>zip</extension>
            <mime-type>application/zip</mime-type>
           </mime-mapping>
           <mime-mapping>
            <extension>rar</extension>
            <mime-type>application/rar</mime-type>
           </mime-mapping>
           <mime-mapping>
            <extension>pdf</extension>
            <mime-type>application/pdf</mime-type>
           </mime-mapping>
           <mime-mapping>
            <extension>txt</extension>
            <mime-type>application/txt</mime-type>
           </mime-mapping>
           <mime-mapping>
            <extension>chm</extension>
            <mime-type>application/mshelp</mime-type>
           </mime-mapping>
           <mime-mapping>
            <extension>mp3</extension>
            <mime-type>audio/x-mpeg</mime-type>
           </mime-mapping>

           <error-page>
            <error-code>400</error-code>
            <location>/error.jsp</location>
           </error-page>
           <error-page>
            <error-code>401</error-code>
            <location>/error.jsp</location>
           </error-page>
           <error-page>
            <error-code>402</error-code>
            <location>/error.jsp</location>
           </error-page>
           <error-page>
            <error-code>403</error-code>
            <location>/error.jsp</location>
           </error-page>
           <error-page>
            <error-code>404</error-code>
            <location>/error.jsp</location>
           </error-page>
           <error-page>
            <error-code>405</error-code>
            <location>/error.jsp</location>
           </error-page>
           <error-page>
            <error-code>406</error-code>
            <location>/error.jsp</location>
           </error-page>
           <error-page>
            <error-code>407</error-code>
            <location>/error.jsp</location>
           </error-page>
           <error-page>
            <error-code>413</error-code>
            <location>/error.jsp</location>
           </error-page>
           <error-page>
            <error-code>414</error-code>
            <location>/error.jsp</location>
           </error-page>
           <error-page>
            <error-code>500</error-code>
            <location>/error.jsp</location>
           </error-page>
           <error-page>
            <error-type>javax.lang.Exception</error-type>
            <location>/error/jsp/errorException.jsp</location>
           </error-page>

           <welcome-file-list>
            <welcome-file>index.jsp</welcome-file>
           </welcome-file-list>

           <session-config>
            <session-timeout>10</session-timeout>
           </session-config>

           <!--
            <jsp-config> <jsp-property-group> <url-pattern>*.jsp</url-pattern>
            <el-ignored>true</el-ignored> </jsp-property-group> </jsp-config>
           -->

          </web-app>

          posted on 2012-07-07 14:56 做強大的自己 閱讀(778) 評論(0)  編輯  收藏 所屬分類: Spring

          主站蜘蛛池模板: 当涂县| 云龙县| 万载县| 湖州市| 蓬莱市| 汽车| 保亭| 大余县| 孟村| 太仆寺旗| 沛县| 阳山县| 灵武市| 敖汉旗| 海安县| 寿宁县| 桂林市| 宕昌县| 陇南市| 南投县| 五家渠市| 台中县| 错那县| 剑河县| 原阳县| 清水河县| 玛多县| 唐山市| 余庆县| 保康县| 巴林左旗| 越西县| 辰溪县| 左权县| 德庆县| 合水县| 佳木斯市| 宜城市| 麻江县| 莎车县| 房产|