zoukankan      html  css  js  c++  java
  • SSM中 web.xml配置文件

    <!--核心监听器
    当tomcat(web容器,应用服务器,web服务器)启动的时候创建spring 工厂类对象,绑定到tomcat上下文中
    -->
    <listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>

    <!--手动指定spring 主配置文件的位置和名称-->

    <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>classpath:spring.xml</param-value>
    </context-param>


    <!--spring的前端控制器 拦截请求 交给spring mvc 处理-->
    <servlet>
    <servlet-name>spring-mvc</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>

    <!--指定spring mvc 主配置文件的位置和名称-->

    <init-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>classpath:spring-mvc.xml</param-value>
    </init-param>

    </servlet>

    <servlet-mapping>
    <servlet-name>spring-mvc</servlet-name>
    <url-pattern>*.do</url-pattern>
    </servlet-mapping>


    <!--配置过滤器解决post请求的中文乱码问题-->

    <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>forceRespanseEncoding</param-name>
    <param-value>true</param-value>
    </init-param>
    </filter>
    <filter-mapping>
    <filter-name>encodingFilter</filter-name>
    <url-pattern>/*</url-pattern>
    </filter-mapping>
  • 相关阅读:
    50个c/c++源代码网站
    VC 编译参数介绍
    基于Winsock API的VC网络编程实战
    notable
    The Beauty of Eventlet
    Transparent HTTP proxy
    用Python写一个本地Sogou代理服务器程序
    普林斯顿大学的计算机学课的作业
    HTML.py a Python module to easily generate HTML tables and lists
    Transparent HTTP proxy in python
  • 原文地址:https://www.cnblogs.com/LFY001023/p/10966722.html
Copyright © 2011-2022 走看看