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>
  • 相关阅读:
    mybatis框架-用类映射返回结果
    ArrayLLis 线程不安 实验
    快速求幂运算笔记
    nyoj 56 阶乘中素数的个数
    求正整数n所有可能的和式的组合(如;4=1+1+1+1、1+1+2、1+3、2+1+1、2+2
    synchronize学习
    nyoj 找球号三(除了一个数个数为基数,其他为偶数,编程之美上的)
    递归判断一个数是否递增
    快速排序c++
    x&-x
  • 原文地址:https://www.cnblogs.com/liurui-bk517/p/11370574.html
Copyright © 2011-2022 走看看