Assume that the request from the client is:
http://localhost:8080/lizhx/lizhx_index.jsp
- The request is sent to the native port 8080, which is obtained by the Coyote http/1.1 connector that is listening there.
- Connector the request to its service engine to handle and wait for the engine to respond.
- Engine obtains the request localhost/lizhx/lizhx_index.jsp, matches all virtual host hosts.
- The engine is matched to host named localhost.
- LocalHost host obtains the request/lizhx/lizhx_index.jsp, matching all the context it owns.
- The host matches to the context where the path is/LIZHX.
- The context of Path = "/lizhx" gets the request for/lizhx_index.jsp, looking for the corresponding servlet in its mapping table.
- Context matches to a servlet with a URL pattern of *.jsp, on the Jspservlet class.
- Constructs the HttpServletRequest object and the HttpServletResponse object, calling the Daget or Dopost method of Jspservlet as a parameter.
- The context returns the HttpServletResponse object to host after the execution is finished.
- Host returns the HttpServletResponse object to the engine.
- The engine returns the HttpServletResponse object to connector.
- Connector returns the HttpServletResponse object to the customer browser.
Tomcat server processes an HTTP request process