zoukankan      html  css  js  c++  java
  • web.xml的加载过程是context-param >> listener >> fileter >> servlet

    Eclipse  Web项目下的Web.xml文件下的标签加载过程是context-param >> listener >> fileter >> servlet

    <?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">
        <welcome-file-list>
            <welcome-file>test.jsp</welcome-file>
        </welcome-file-list>
        <!-- Spring IOC配置 -->
        <context-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>classpath:spring/applicationContext.xml</param-value>
        </context-param>
    
        <listener>
            <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
        </listener>
        <filter>
        <filter-name>myFilter</filter-name>
        <filter-class>xx.MyFilter</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>myFilter</filter-name>
    <servlet-name>目标资源一</servlet-name>
    </filter-mapping>
    <filter-mapping>
    <filter-name>myFilter</filter-name>
    <servlet-name>目标资源二</servlet-name>
    </filter-mapping> <!-- SpringMVC --> <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/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> </web-app>
  • 相关阅读:
    mysql导入报错: Incorrect string value: 'xF0xA0x83x8CxE5x8D...' for column 'q_title' at row 4
    spring原理解析
    php连接mysql报错The server requested authentication method unknown to the client
    springmvc快速入门
    set集合
    Linux安装MySQL5.7
    Java中jar包获取资源文件的方式
    ⚡王道数据结构绪论⚡
    ❤️排序❤️
    😊考研线代知识点汇总😊
  • 原文地址:https://www.cnblogs.com/lyxcode/p/10736419.html
Copyright © 2011-2022 走看看