Tomcat processes HTTP

Source: Internet
Author: User
Tomcat processes HTTP

Assume that the request from the customer is:
HTTP: /localhost: 8080/wsota/wsota_index.jsp

1) The request is sent to the local port 8080, which is obtained by coyote HTTP/1.1 Connector

2) connector submits the request to the engine of the Service to process it, and waits for a response from the engine.

3) The engine obtains the request localhost/wsota/wsota_index.jsp, matching all the virtual host hosts it owns.

4) The engine matches the host named localhost (the request is handed over to the host even if the match fails, because the host is defined as the default host of the engine)

5) the localhost obtains the request/wsota/wsota_index.jsp and matches all the context

6) The host matches the context in the/wsota path. (if no match is found, submit the request to the context with the path name "" for processing)

7) obtain the request/wsota_index.jsp from the context of Path = "/wsota" and find the corresponding servlet in its mapping table.

8) the context matches the servlet whose URL pattern is *. jsp, which corresponds to the jspservlet class.

9) construct the httpservletrequest object and the httpservletresponse object, and call the jspservlet doget or dopost method as parameters.

10) Context returns the httpservletresponse object after execution to the host

11) The 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 client browser.

Related Article

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.