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>
  • 相关阅读:
    7. 配置undo表空间
    8. Truncate undo表空间
    品味ZooKeeper之Watcher机制_2
    品味ZooKeeper之纵古观今_1
    《Andrew Ng深度学习》笔记5
    《Andrew Ng深度学习》笔记4
    《Andrew Ng深度学习》笔记3
    《Andrew Ng深度学习》笔记2
    《Andrew Ng深度学习》笔记1
    回归算法
  • 原文地址:https://www.cnblogs.com/lyxcode/p/10736419.html
Copyright © 2011-2022 走看看