Start Tomcat, enter http://localhost:8080/web_kevin/hello.html in the browser, and the following things happen:
1. The browser resolves the hostname, that is, resolves localhost. The browser will first go to the local hosts (path to C:\Windows\System32\drivers\etc) file to query whether there is a localhost corresponding IP, if there is an attempt to connect the IP corresponding to the host, if not, connect to the DNS server, Then continue to query the DNS server for the IP corresponding to localhost, if there is a connection to the IP corresponding host, if there is no error.
2. After the browser connects to the server with the host name corresponding to the IP address, sends the HTTP request, the server receives the request, first resolves the hostname, that is, resolves localhost, and then parses the Web application, that is, parsing the Web_kevin, finally parsing the resource name, That is, parsing hello.html, retrieving the resource and returning it to the browser, the browser renders the received information on the page.
Browser access Web site schematic diagram