Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
HTTP REQUEST AND
HTTP RESPONSE
BY
SANA MATEEN
HTTP REQUEST
• HTTP (Hypertext Transfer Protocol) is perhaps the most popular
application protocol used in the Internet (o...
Important header information
Accept This header specifies the MIME types that the browser or other
clients can handle. Val...
HTTP GET REQUEST
HTTP POST REQUEST
Http request and http response
Http request and http response
Http request and http response
Http request and http response
Http request and http response
Http request and http response
Http request and http response
Http request and http response
Upcoming SlideShare
Loading in …5
×

Http request and http response

1,011 views

Published on

Handling Http Request and Response in servlets and details about user authentication using mysql database

Published in: Engineering
  • Be the first to comment

Http request and http response

  1. 1. HTTP REQUEST AND HTTP RESPONSE BY SANA MATEEN
  2. 2. HTTP REQUEST • HTTP (Hypertext Transfer Protocol) is perhaps the most popular application protocol used in the Internet (or The WEB). • HTTP is a stateless protocol. In other words, the current request does not know what has been done in the previous requests. • Whenever you issue URL from your browser to get a web resource using HTTP, the browser turns the URL into a request message and sends it to the HTTP server. The HTTP server interprets the request message, and returns you an appropriate response message, which is either the resource you requested or an error message.
  3. 3. Important header information Accept This header specifies the MIME types that the browser or other clients can handle. Values of image/png or image/jpeg are the two most common possibilities. Authorization This header is used by clients to identify themselves when accessing password-protected Web pages. Content-Length This header is applicable only to POST requests and gives the size of the POST data in bytes. Methods to read HTTP Header: There are following methods which can be used to read HTTP header in your servlet program. These methods are available with HttpServletRequest object. Enumeration getHeaderNames() Returns an enumeration of all the header names this request contains String getHeader(String name) Returns the value of the specified request header as a String.
  4. 4. HTTP GET REQUEST
  5. 5. HTTP POST REQUEST

×