Tomcat server processes an HTTP request process

Source: Internet
Author: User

Assume that the request from the client is:

http://localhost:8080/lizhx/lizhx_index.jsp

  1. The request is sent to the native port 8080, which is obtained by the Coyote http/1.1 connector that is listening there.
  2. Connector the request to its service engine to handle and wait for the engine to respond.
  3. Engine obtains the request localhost/lizhx/lizhx_index.jsp, matches all virtual host hosts.
  4. The engine is matched to host named localhost.
  5. LocalHost host obtains the request/lizhx/lizhx_index.jsp, matching all the context it owns.
  6. The host matches to the context where the path is/LIZHX.
  7. The context of Path = "/lizhx" gets the request for/lizhx_index.jsp, looking for the corresponding servlet in its mapping table.
  8. Context matches to a servlet with a URL pattern of *.jsp, on the Jspservlet class.
  9. Constructs the HttpServletRequest object and the HttpServletResponse object, calling the Daget or Dopost method of Jspservlet as a parameter.
  10. The context returns the HttpServletResponse object to host after the execution is finished.
  11. Host returns the HttpServletResponse object to the engine.
  12. The engine returns the HttpServletResponse object to connector.
  13. Connector returns the HttpServletResponse object to the customer browser.

Tomcat server processes an HTTP request process

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.