URI and URL
Every set of request and response constitute one completed http session. For every request the client opens a new connection, and from the servers point of view every response is a new response to a request and the server does not remember the client any more. This is called stateless session. The next question that will come to your mind is, then how is the information maintained between different pages. Well don?t worry, at a later part we will see how information is maintained and persisted between various request from the same client.
The initial part of a http request consists of a method name. Following are valid method names for http 1.1 : GET, HEAD, POST, PUT, OPTIONS, DELETE, TRACE, CONNECT
But before we have a look at these methods, let us first understand what is the meaning of a URI, and a URL.
A URI [Uniform Resource Identifier] as the name suggests, is a pointer to a specific resource.
For example,
contract/customer/images/logo.jpg
contract/customer/info.html
A URL [Uniform Resource Locater] on the other hand is the address of the resource. It specifies the protocol (e.g. http:// or ftp://) and the domain name for the resource (e.g. www.visualbuilder.com). Next appended after that is the URI. A URI forms a part of the URL.
For example,

The next thing we need to know is,how are the various methods actually invoked. Well it is quite simple. As you all know there is a form element inside a HTML page which is used to send information to the server. This element looks something like this,
<Form name="loginForm" action="/customer/loginServlet" method="POST">
The method attribute inside a form element tells the browser to use the POST method to request a resource. If there was no method attribute then it would have defaulted to GET method.
|