![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
tomcat
烈冬-冰夏
这个作者很懒,什么都没留下…
展开
-
tomcat源码浅析(三)之webapps的解析
1HostConfig在start中会调用deployApps方法扫描appBase目录下的apps,加载DocBase/META-INF/context.xml.Hostconfig.deployapps代码 protected void deployApps() { File appBase = appBase(); File c原创 2017-04-01 15:33:31 · 559 阅读 · 0 评论 -
tomcat源码浅析(二)之server.xml的解析
server.xml的解析是使用Digester来解析的,Digester的详细规则如下:Catalina.createstartdigester代码 protected Digester createStartDigester() { long t1=System.currentTimeMillis(); // Initialize t原创 2017-04-01 15:33:45 · 431 阅读 · 0 评论 -
tomcat源码浅析(五)之请求的完整过程(http1.1)
http1.1的Connector的protocolHandler为org.apache.coyote.http11.Http11Protocol。Http11Protocol的endpoint为JIoEndpoint。JIoEndpoint的handler为Http11Protocol.Http11ConnectionHandler。 以url为http://127.0.0.1:808原创 2017-04-01 17:58:00 · 1540 阅读 · 0 评论 -
tomcat源码浅析(一)之 架构
tomcat代码看似很庞大,但从结构上看却很清晰和简单,它主要由一堆组件组成,如Server、Service、Connector等,并基于JMX管理这些组件,另外实现以上接口的组件也实现了代表生存期的接口Lifecycle,使其组件履行固定的生存期,在其整个生存期的过程中通过事件侦听LifecycleEvent实现扩展。原创 2017-03-31 15:21:47 · 292 阅读 · 0 评论 -
tomcat源码浅析(四)之web.xml解析
1.Context在start时先调用bindThread()将Loard的classLoader绑定到线程中,这样Digester在去classLoader时就可以取到Loard的classLoader。Standardcontext.startinternal代码 protected synchronized void startInternal() throws Li原创 2017-04-01 17:57:09 · 1838 阅读 · 0 评论