zoukankan      html  css  js  c++  java
  • spring mvc---web.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
    <display-name>SSM</display-name>
    <!--spring 相关配置文件 B-->
    <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>
    classpath*:/config/springs/applicationContext*.xml,
    </param-value>
    </context-param>
    <!-- 配置Spring上下文监听器 -->
    <listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
    <!--spring 相关配置文件 E-->

    <!-- 配置Spring字符编码过滤器 B-->
    <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>
    <init-param>
    <param-name>forceEncoding</param-name>
    <param-value>true</param-value>
    </init-param>
    </filter>
    <filter-mapping>
    <filter-name>encodingFilter</filter-name>
    <url-pattern>/*</url-pattern>
    </filter-mapping>
    <!-- 配置Spring字符编码过滤器 E-->

    <!--springmvc 入口配置 B -->
    <servlet>
    <servlet-name>springMVC</servlet-name>
    <!-- springmvc总控制器 -->
    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    <init-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>classpath*:/config/springs/spring-mvc.xml</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>springMVC</servlet-name>
    <url-pattern>*.do</url-pattern>
    </servlet-mapping>
    <!--springmvc 入口配置 E -->
    <!-- 配置log4j B-->
    <context-param>
    <param-name>log4jConfigLocation</param-name>
    <param-value>classpath:/config/properties/log4j.properties</param-value>
    </context-param>
    <!-- 60s 检测日志配置 文件变化 -->
    <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>
    <!-- 配置log4j E-->

    <!-- 防止内存泄漏 -->
    <listener>
    <listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class>
    </listener>
    <session-config>
    <session-timeout>30</session-timeout>
    </session-config>
    <error-page>
    <exception-type>java.lang.Throwable</exception-type>
    <location>/WEB-INF/views/error/500.jsp</location>
    </error-page>
    <error-page>
    <error-code>500</error-code>
    <location>/WEB-INF/views/error/500.jsp</location>
    </error-page>
    <error-page>
    <error-code>404</error-code>
    <location>/WEB-INF/views/error/404.jsp</location>
    </error-page>

    <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
    </web-app>

  • 相关阅读:
    RGB888转RGB666
    bmp文件格式详细解析
    Qt 5简介
    IntelliJ IDEA 快捷键
    猫猫学iOS之小知识之_xcode插件的删除方法_自己主动提示图片插件KSImageNamed有时不灵_分类或宏之类不能自己主动提示,
    sql server 2008出现远程过程调用失败
    Oracle-31-对视图DML操作
    uva 11127(暴力)
    各种排序算法的分析与实现
    我的Android进阶之旅------&gt;怎样解决Android 5.0中出现的警告: Service Intent must be explicit:
  • 原文地址:https://www.cnblogs.com/krystal0901/p/5517737.html
Copyright © 2011-2022 走看看