zoukankan      html  css  js  c++  java
  • Tomcat笔记

    Tomcat笔记

    Catalina - org.apache.catalina.startup.Catalina    
        Server - org.apache.catalina.core.StandardServer
            Service - org.apache.catalina.core.StandardService
                Connector - org.apache.catalina.connector.Connector                                                    
                    +---------------------------------------------------------------------------------------------------------------------------------------------------------------+
                    |此部分根据不同请求协议实现有所不同,以下为Nio方式实现Http1.1协议
                    |ProtocolHandler - org.apache.coyote.http11.Http11NioProtocol                                                                                                   
                    |   AbstractEndpoint - org.apache.tomcat.util.net.NioEndpoint                                                                                                   
                    |       Acceptor - org.apache.tomcat.util.net.Acceptor - 接收socket请求                                                                                           
                    |       NioEndpoint.Poller - org.apache.tomcat.util.net.NioEndpoint.Poller - NioSelector                                                                        
                    |   AbstractEndpoint.Handler - org.apache.coyote.AbstractProtocol.ConnectionHandler - NioHandler - 调用Processor.process处理socket请求                                    
                    |   Processor - org.apache.coyote.http11.Http11Processor - 从socket中获取请求数据并封装为Servlet请求、调用Adapter.service处理请求                                    
                    +---------------------------------------------------------------------------------------------------------------------------------------------------------------+
                    Adapter - org.apache.catalina.connector.CoyoteAdapter - 根据Servlet请求数据(url,method)匹配对应的Host、Context、Wrapper,并调用Engine责任链头开始处理数据
                Engine - org.apache.catalina.core.StandardEngine
                    Pipeline - org.apache.catalina.core.StandardPipeline
                        Valve - org.apache.catalina.core.StandardEngineValve - 默认(最后一步)处理 - 调用Host的责任链头处理
                    Host - org.apache.catalina.core.StandardHost
                        Pipeline - org.apache.catalina.core.StandardPipeline
                            Valve - org.apache.catalina.core.StandardHostValve - 默认(最后一步)处理 - 调用Context的责任链头处理
                        Context - org.apache.catalina.core.StandardContext
                            Pipeline - org.apache.catalina.core.StandardPipeline
                                Valve - org.apache.catalina.core.StandardContextValve - 默认(最后一步)处理 - 调用Wrapper的责任链头处理
                            Wrapper - org.apache.catalina.core.StandardWrapper  
                                Pipeline - org.apache.catalina.core.StandardPipeline 
                                    Valve - org.apache.catalina.core.StandardWrapperValve - 默认(最后一步)处理 - 找到Servlet和FilterChain,调用FilterChain.doFilter
                                FilterChain - org.apache.catalina.core.ApplicationFilterChain - 依次调用Filter.doFilter。如果结束,调用Servlet.service
                                Servlet - javax.servlet.Servlet
    
  • 相关阅读:
    .net 读写记事本文件
    .net webservers的使用
    对象的复制
    .net form身份验证的配置
    JAVA反射机制
    Java6 脚本引擎(用Java调用JS脚本)调用js
    Ant教程
    JAVA关键字详解
    Java环境配制
    Java常用字符集编码详解
  • 原文地址:https://www.cnblogs.com/jimmyfan/p/11882745.html
Copyright © 2011-2022 走看看