码迷,mamicode.com
首页 > 其他好文 > 详细

请求由tomcat转到servlet的临界点

时间:2014-10-29 10:42:04      阅读:164      评论:0      收藏:0      [点我收藏+]

标签:style   blog   io   color   ar   java   sp   div   on   

 1 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>StandardWrapperValve--->Servlet>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 2    请求转出,都由valve来调用servlet的service方法
 3    [1] 直接转出
 4    StandardWrapperValve
 5    void java.org.apache.catalina.core.StandardWrapperValve.invoke(Request request, Response response) throws IOException, ServletException
 6    --->filterChain.doFilter
 7    ------------>servlet.service(request, response);
 8       
 9    [2] 内部循环再转出
10    -------->((AsyncContextImpl)request.getAsyncContext()).doInternalDispatch();
11           ----> void java.org.apache.catalina.core.AsyncContextImpl.doInternalDispatch() throws ServletException, IOException
12                ----> 
13                         Runnable runnable = dispatch;
14                         dispatch = null;
15                         runnable.run();
16                         
17                         ------------->
18                          void java.org.apache.catalina.core.AsyncContextImpl.dispatch(ServletContext context, String path)
19                                 ---->applicationDispatcher.dispatch(servletRequest, servletResponse);
20                                 
21                                 
22                                 AsyncDispatcher=applicationDispatcher
23 
24                                 final class ApplicationDispatcher implements AsyncDispatcher, RequestDispatcher
25 
26                                 ------>final class ApplicationDispatcher implements AsyncDispatcher, RequestDispatcher
27                                         ---------> void java.org.apache.catalina.core.ApplicationDispatcher.doDispatch(ServletRequest request, ServletResponse response) throws ServletException, IOException
28                                                    -------------> void java.org.apache.catalina.core.ApplicationDispatcher.doDispatch(ServletRequest request, ServletResponse response) throws ServletException, IOException
29                                                                 //Servlet Service Method is called by the FilterChain
30                                                                   ----------->void java.org.apache.catalina.core.ApplicationFilterChain.doFilter(ServletRequest request, ServletResponse response) throws IOException, ServletException
31                                                                      --> void java.org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ServletRequest request, ServletResponse response) throws IOException, ServletException
32                                                                             ------------>servlet.service(request, response);
33     最终都是由servlet.service(request, response);                                                        
34 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>StandardWrapperValve--->Servlet>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
35    
36    

 

请求由tomcat转到servlet的临界点

标签:style   blog   io   color   ar   java   sp   div   on   

原文地址:http://www.cnblogs.com/rojas/p/4058658.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!