zoukankan      html  css  js  c++  java
  • web.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns="http://java.sun.com/xml/ns/javaee"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
              http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
               version="3.0">
        <display-name>hcrj</display-name>    
        
        <welcome-file-list>
                <welcome-file>login.jsp</welcome-file>
        </welcome-file-list>
       
       <!--监听器启动spring容器-->
        <listener>
            <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
        </listener>
       
       <!--指定spring配置文件-->
        <context-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>classpath:applicationContext-*.xml</param-value>
        </context-param>
    
        <!--配置post乱码过滤器-->
        <filter>
            <filter-name>characterEncodingFitler</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>characterEncodingFitler</filter-name>
            <url-pattern>/*</url-pattern>
        </filter-mapping>
      
      <!-- 请求的时候写隐藏的name="_method" value="delete|put|post|get" 只能使用_method 源码为 public static final String DEFAULT_METHOD_PARAM = "_method"; --> <filter>      <filter-name>hiddenHttpMethodFilter</filter-name>     <filter-class>org.springframework.web.filter.HiddenHttpMethodFilter</filter-class> </filter> <filter-mapping>     <filter-name>hiddenHttpMethodFilter</filter-name>      <servlet-name>springmvc</servlet-name> </filter-mapping>    <!-- 自行配制的过滤器 <filter> <filter-name>loginFilter</filter-name> <filter-class>com.hcrj.filter.LoginFilter</filter-class> </filter> <filter-mapping> <filter-name>loginFilter</filter-name> <servlet-name>springmvc</servlet-name> </filter-mapping> --> <!--启动springmvc的前端控制器--> <servlet> <servlet-name>springmvc</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:springmvc.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <!--将该servlet设置为默认的servlet--> <servlet-mapping> <servlet-name>springmvc</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping> </web-app>   
    人生没有彩排,每天都是现场直播!
  • 相关阅读:
    Pandas提取数据存入excel
    获取页面元素二
    selenium如何解决IE自动填充表单问题
    IE浏览器相关的问题及解决方案
    TestNG入门教程(TestNG介绍、在Eclipse中安装TESTNG、测试小例子、基本注解、如何执行测试、按顺序执行Case、异常测试、组合测试、参数化测试、忽略测试、依赖测试、测试结果报告)
    selenium Webdriver 处理 —— 通过时间控件给文本框赋值
    列表翻页,选中目标记录
    bug统计
    在eclipse中安装TestNG
    selenium搭建、运行
  • 原文地址:https://www.cnblogs.com/northern-light/p/8539090.html
Copyright © 2011-2022 走看看