zoukankan      html  css  js  c++  java
  • ##SSM框架整合中web.xml配置文件

    <!DOCTYPE web-app PUBLIC
     "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
     "http://java.sun.com/dtd/web-app_2_3.dtd" >
    
    <web-app>
      <display-name>Archetype Created Web Application</display-name>
      <!--设置监听器-->
      <!--配置Spring的监听器,默认只加载WEB-INF目录下的applicationContext.xml配置文件-->
      <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
      </listener>
      <!--设置配置文件的路径-->
      <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>classpath:applicationContext.xml</param-value>
      </context-param>
      <context-param>
        <param-name/>
        <param-value/>
      </context-param>
      <!--前端控制器-->
      <servlet>
        <servlet-name>dispatcherServlet</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <init-param>
          <param-name>contextConfigLocation</param-name>
          <param-value>classpath:spring-mvc.xml</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
      </servlet>
      <servlet-mapping>
        <servlet-name>dispatcherServlet</servlet-name>
        <url-pattern>/</url-pattern>
      </servlet-mapping>
      <!--处理中文乱码问题-->
      <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>
      </filter>
      <filter-mapping>
        <filter-name>characterEncodingFilter</filter-name>
        <url-pattern>/*</url-pattern>
      </filter-mapping>
    </web-app>
  • 相关阅读:
    Razor 常用又容易忘记语法
    游览器 reflow
    正则表达式
    migration to end point routing
    js 翻译 c# 注意事项
    Angular 学习笔记 work with excel (导出 excel)
    html4,5 basic
    IIS 服务器配置
    meta 的用途
    正则表达 常用
  • 原文地址:https://www.cnblogs.com/liurui-bk517/p/11370574.html
Copyright © 2011-2022 走看看