Overview of HTTP in Java

Generate QR Code ISO/IEC18004 in Java Overview of HTTP
221 Overview of HTTP
Encoding QR-Code In Java
Using Barcode creation for Java Control to generate, create Denso QR Bar Code image in Java applications.
The Hypertext Transfer Protocol (HTTP), the Web's application-layer protocol, is at the heart of the Web HTTP is implemented in two programs: a client program and server program The client program and server programs, executing on different end systems, talk to each other by exchanging HTTP messages HTTP defines the structure of these messages and how the client and server exchange the messages Before explaining HTTP in detail, it is useful to review some Web terminology A Web page (also called a document) consists of objects An object is a simply file -- such as a HTML file, a JPEG image, a GIF image, a Java applet, an audio clip, etc -- that is addressable by a single URL Most Web pages consist of a base HTML file and several referenced objects For example, if a Web page contains HTML text and five JPEG images, then the Web page has six objects: the base HTML file plus the five images The base HTML file references the other objects in the page with the objects' URLs Each URL has two components: the host name of the server that houses the object and the object's path name For example, the URL wwwsomeSchooledu/someDepartment/picturegif has wwwsomeSchooledu for a host name and /someDepartment/picturegif for a path name A browser is a user agent for the Web; it displays to the user the requested Web page and provides numerous navigational and configuration features Web browsers also implement the client side of HTTP Thus, in the context of the Web, we will interchangeably use the words "browser" and "client" Popular Web browsers include Netscape Communicator and Microsoft Explorer A Web server houses Web objects, each addressable by a URL Web servers also implement the server side of HTTP Popular Web servers include Apache, Microsoft Internet Information Server, and the Netscape Enterprise Server (Netcraft provides a nice survey of Web server penetration [Netcraft]) HTTP defines how Web clients (ie, browsers) request Web pages from servers (ie, Web servers) and how servers transfer Web pages to clients We discuss the interaction between client and server in detail below, but the general idea is illustrated in Figure 22-1 When a user requests a Web page (eg, clicks on a hyperlink), the browser sends HTTP request messages for the objects in the page to the server The server receives the requests and responds with HTTP response messages that contain the objects Through 1997 essentially all browsers and Web servers implement version HTTP/10, which is defined in [RFC 1945] Beginning in 1998 Web servers and browsers began to implement version HTTP/11, which is defined in [RFC 2068] HTTP/11 is backward compatible with HTTP/10; a Web server
Print Bar Code In Java
Using Barcode generation for Java Control to generate, create bar code image in Java applications.
file:///D|/Downloads/Livros/computa o/Computer%20NetDown%20Approach%20Featuring%20the%20Internet/httphtm (1 of 14)20/11/2004 15:51:52
Decode Barcode In Java
Using Barcode decoder for Java Control to read, scan read, scan image in Java applications.
The HyperText Transfer Protocol
Creating Quick Response Code In C#
Using Barcode generation for .NET Control to generate, create Denso QR Bar Code image in VS .NET applications.
running 11 can "talk" with a browser running 10, and a browser running 11 can "talk" with a server running 10
Encoding QR Code ISO/IEC18004 In Visual Studio .NET
Using Barcode creation for ASP.NET Control to generate, create QR image in ASP.NET applications.
Figure 22-1: HTTP request-response behavior Both HTTP/10 and HTTP/11 use TCP as their underlying transport protocol (rather than running on top of UDP) The HTTP client first initiates a TCP connection with the server Once the connection is established, the browser and the server processes access TCP through their socket interfaces As described in Section 21, on the client side the socket interface is the "door" between the client process and the TCP connection; on the server side it is the "door" between the server process and the TCP connection The client sends HTTP request messages into its socket interface and receives HTTP response messages from its socket interface Similarly, the HTTP server receives request messages from its socket interface and sends response messages into the socket interface Once the client sends a message into its socket interface, the message is "out of the client's hands" and is "in the hands of TCP" Recall from Section 21 that TCP provides a reliable data transfer service to HTTP This implies that each HTTP request message emitted by a client process eventually arrives in tact at the server; similarly, each HTTP response message emitted by the server process eventually arrives in tact at the client Here we see one of the great advantages of a layered architecture - HTTP need not worry about lost data, or the details of how TCP recovers from loss or reordering of data within the network That is the job of TCP and the protocols in the lower layers of the protocol stack TCP also employs a congestion control mechanism which we shall discuss in detail in 3 We only mention here that this mechanism forces each new TCP connection to initially transmit data at a relatively slow rate, but then allows each connection to ramp up to a relatively high rate when the network is uncongested The initial slow-transmission phase is referred to as slow start It is important to note that the server sends requested files to clients without storing any state information about the client If a particular client asks for the same object twice in a period of a few seconds, the server does not respond by saying that it just served the object to the client; instead, the server resends the object, as it has completely forgotten what it did earlier Because an HTTP server maintains no information about the clients, HTTP is said to be a stateless protocol
QR Code JIS X 0510 Printer In VS .NET
Using Barcode creator for .NET Control to generate, create QR-Code image in VS .NET applications.
Quick Response Code Generator In VB.NET
Using Barcode creation for .NET Control to generate, create QR Code image in VS .NET applications.
EAN-13 Generation In Java
Using Barcode maker for Java Control to generate, create UPC - 13 image in Java applications.
Code-128 Generator In Java
Using Barcode drawer for Java Control to generate, create Code 128B image in Java applications.
Create Leitcode In Java
Using Barcode generation for Java Control to generate, create Leitcode image in Java applications.
Bar Code Printer In .NET Framework
Using Barcode encoder for ASP.NET Control to generate, create bar code image in ASP.NET applications.
Print ANSI/AIM Code 128 In Visual Studio .NET
Using Barcode encoder for ASP.NET Control to generate, create Code 128 Code Set A image in ASP.NET applications.
Scan Bar Code In Java
Using Barcode recognizer for Java Control to read, scan read, scan image in Java applications.