首页 > 代码库 > 请求由tomcat转到servlet的临界点

请求由tomcat转到servlet的临界点

 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, IOException12                ----> 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=applicationDispatcher23 24                                 final class ApplicationDispatcher implements AsyncDispatcher, RequestDispatcher25 26                                 ------>final class ApplicationDispatcher implements AsyncDispatcher, RequestDispatcher27                                         ---------> void java.org.apache.catalina.core.ApplicationDispatcher.doDispatch(ServletRequest request, ServletResponse response) throws ServletException, IOException28                                                    -------------> void java.org.apache.catalina.core.ApplicationDispatcher.doDispatch(ServletRequest request, ServletResponse response) throws ServletException, IOException29                                                                 //Servlet Service Method is called by the FilterChain30                                                                   ----------->void java.org.apache.catalina.core.ApplicationFilterChain.doFilter(ServletRequest request, ServletResponse response) throws IOException, ServletException31                                                                      --> void java.org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ServletRequest request, ServletResponse response) throws IOException, ServletException32                                                                             ------------>servlet.service(request, response);33     最终都是由servlet.service(request, response);                                                        34 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>StandardWrapperValve--->Servlet>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>35    36    

 

请求由tomcat转到servlet的临界点