首页 > 编程语言 > 详细

web.xml(spring/spring mvc/hibernate)

时间:2016-01-27 19:00:10      阅读:186      评论:0      收藏:0      [点我收藏+]
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <display-name>YHXL</display-name>
    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>
            /WEB-INF/config/application-context.xml
            /WEB-INF/config/captcha-context.xml
            /WEB-INF/config/yhxl-core-context.xml
            /WEB-INF/config/yhxl-basic-context.xml
            /WEB-INF/config/yhxl-pay-context.xml
        </param-value>
    </context-param>
    <filter>
        <filter-name>processTime</filter-name>
        <filter-class>cn.com.yhxl.common.web.ProcessTimeFilter</filter-class>
    </filter>
    <filter>
        <filter-name>encoding</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>osivFilter</filter-name>
        <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>processTime</filter-name>
        <url-pattern>*.do</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>encoding</filter-name>
        <url-pattern>*.do</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>osivFilter</filter-name>
        <url-pattern>*.do</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>processTime</filter-name>
        <url-pattern>*.jspx</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>encoding</filter-name>
        <url-pattern>*.jspx</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>osivFilter</filter-name>
        <url-pattern>*.jspx</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>processTime</filter-name>
        <url-pattern>*.jhtml</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>encoding</filter-name>
        <url-pattern>*.jhtml</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>osivFilter</filter-name>
        <url-pattern>*.jhtml</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>processTime</filter-name>
        <url-pattern>*.htm</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>encoding</filter-name>
        <url-pattern>*.htm</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>osivFilter</filter-name>
        <url-pattern>*.htm</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>processTime</filter-name>
        <url-pattern>*.jsp</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>encoding</filter-name>
        <url-pattern>*.jsp</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>osivFilter</filter-name>
        <url-pattern>*.jsp</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>osivFilter</filter-name>
        <url-pattern>/</url-pattern>
    </filter-mapping>

    <servlet>
        <servlet-name>YHXLAdmin</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <init-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>/WEB-INF/config/yhxl-servlet-admin.xml</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet>
    <servlet-name>YHXLFront</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <init-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>/WEB-INF/config/yhxl-servlet-front.xml</param-value>
        </init-param>
        <load-on-startup>2</load-on-startup>
    </servlet>
    <servlet>
        <servlet-name>Jcaptcha</servlet-name>
        <servlet-class>cn.com.yhxl.common.captcha.JcaptchaServlet</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>Jcaptcha</servlet-name>
        <url-pattern>/captcha.svl</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>YHXLAdmin</servlet-name>
        <url-pattern>/system/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>YHXLFront</servlet-name>
        <url-pattern>*.jspx</url-pattern>
    </servlet-mapping>
    
    <!-- 监控LogBack运行 -->
    <!--
    <servlet>
        <servlet-name>ViewStatusMessages</servlet-name>
        <servlet-class>ch.qos.logback.classic.ViewStatusMessagesServlet</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>ViewStatusMessages</servlet-name>
        <url-pattern>/lbClassicStatus</url-pattern>
    </servlet-mapping>
     -->
    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
    <listener>
        <listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class>
    </listener>
    <session-config>
        <session-timeout>720</session-timeout>
    </session-config>
    <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.shtml</welcome-file>
        <welcome-file>index.jhtml</welcome-file>
    </welcome-file-list>
    <error-page>
        <error-code>403</error-code>
        <location>/WEB-INF/error/403.html</location>
    </error-page>
    <error-page>
        <error-code>404</error-code>
        <location>/404.html</location>
    </error-page>
    <error-page>
        <error-code>500</error-code>
        <location>/500.html</location>
    </error-page>
    <mime-mapping>
        <extension>rar</extension>
        <mime-type>application/zip</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>doc</extension>
        <mime-type>application/zip</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>ppt</extension>
        <mime-type>application/zip</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>txt</extension>
        <mime-type>application/zip</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>pdf</extension>
        <mime-type>application/zip</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>xls</extension>
        <mime-type>application/zip</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>wps</extension>
        <mime-type>application/zip</mime-type>
    </mime-mapping>
</web-app>

 

web.xml(spring/spring mvc/hibernate)

原文:http://www.cnblogs.com/luoxiaolei/p/5163937.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!