Analysis on the principle of Web application by "Javaweb exploration"

Source: Internet
Author: User

The next period of time, will continue to summarize the relevant knowledge of javaweb. Today, this blog, as the opening, highlights the operation mechanism of Javaweb.


First of all, introduce the concept of the Web, the Web is a distributed application framework, I first right vote interrupted, why the Web is a distributed application framework, we have a good analysis. Personal point of view Ah, first talk about the distribution, what is distributed? is to study how to divide a problem that requires a very large computational or working ability into a number of small pieces, and then allocate those parts to many computers for processing. Or there is a huge amount of data that will be distributed across multiple separate machines and devices. Is that not very abstract? Like, I need to process a batch of parts, but this batch of parts requires 10,000 workers. So now I'm dispersing this batch of parts to 100 factories, which may require only 100 workers per plant and even less, and the time will be much higher. This is distributed. And the so-called Web is a distributed application architecture, in fact, the meaning is that the Web with customer, server communication mode, this concept we will continue to introduce the concept of the web when it is also mentioned, and the customer to request information from the server side, and a server is far from meeting the requirements of customers, because the storage of information is limited , so the information is stored on many, many servers so that the client can find information on each Web server in the network through a browser, like this ...



The following is the concept of the web, which says, "The Web is a distributed architecture designed to share all the interconnected information that is distributed across Web servers across the network." These are explained earlier, "The Web uses the customer, the server communication pattern, the customer and the server communicates with the HTTP protocol, the web uses the HTML to link the information on the network." The information is stored on the server side, and the client can find the information on each Web server in the network through a browser. " So the question comes again, and when it comes to the HTTP protocol, let's say a few more words. We all know that the HTTP protocol is hyper Text Transfer protocol Hypertext Transfer Protocol, is about how to transmit super text on the network, HTML protocol, then we have to say a bit of HTML.


When we first learned BS content, the first thing we touched was HTML. We all know that the ultimate purpose of the web is to show people what we want to search for, and that HTML can contain textual content and even other forms of information. So we know the HTML has a lot of tags ah, such as used to mark the inclusion of image information,<p>, <font>, <br> and so on to set the information in the browser display form, with <a> To super-link to other information and so on. At the same time, the browser understands the HTML language because it resolves markup languages in HTML and can display HTML documents in a browser window.


Say it again, we said. The HTTP protocol is the protocol that specifies how the HTML is transmitted over the network, the basic workings of the web, and the details of the communication between the browser and the Web server. To be clear, the client makes an unsolicited HTTP request, the server receives an HTTP request, and then returns the corresponding HTTP result. Speaking of URLs, we all know that when we enter a URL address in the browser, we can receive the remote Web server sent over the data, the URL is uniform Resource locator abbreviation, representing the Uniform Resource Locator, It is a method of addressing specifically for identifying resource locations on the network. URLs are typically made up of three parts:

* * Application layer protocol

* * Host IP address or domain name

* * Resource Path/file name

so the format of the URL is as follows: Application layer protocol://Host IP address or domain name/resource path/file name, so take a seat, such as a URL address of http://www.ignore.org/java/ Helloworld.htm, where HTTP is the application-level protocol, www.ignore.org is the domain name, Java is the resource's path, and helloworld.htm is the file name. Speaking of which, the web-related concept is WWW, the world Wide web,www refers to the global web, which takes the Internet as the network platform, The Internet is a collection of interconnected computers and other devices from around the world, and WWW is a distributed Application architecture on the Internet.


Well, now introduced here, let's comb the whole web operation mechanism:

* * First, the user enters the URL address in the browser: http://www.ignore.org/java/helloWorld.htm

* * The browser establishes a TCP connection with a Web server with a domain name of "www.ignore.org" on the network

* * The browser makes an HTTP request to access "java/helloworld.htm"

** After the Web server receives the HTTP request, it resolves the HTTP request and then sends back the HTTP corresponding to the data containing the helloworld.htm file.

* * the browser parses the HTTP request after receiving the HTTP response and displays the Helloworld.htm file in the window

* * Finally, the TCP connection between the browser and the Web server is closed.


Re-review the web operating mechanism appears in the noun: browser, URL, TCP, HTTP, Web server, there is a less noun, that is, HTML, it is actually the above mentioned browser parsing and display in the window information. Today this blog first written here, the next blog will continue to introduce the relevant content of Javaweb, please look forward to. Originally wanted to use an image of the example to explain the entire web operation mechanism, think for a half-day also did not come up with the right, and so I have good ideas, I will update up. Good night, everybody!


Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Analysis on the principle of Web application by "Javaweb exploration"

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.