The main purpose of a web server is: A Web Server takes a request from a client and gives a response.
A client can be a human being or a browser such as Mozilla, IE, Chrome Etc. Before we start, here is a diagram showing the main purpose of a web server.
REQUEST
Request: A request could be an image, PDF File file or even an html page.
A request can have several methods. But the most commonly used are GET and POST.
GET: The simplest HTTP method which job is to ask the server to get a resource and send it back.
POST: More powerful than GET. You can request resources, and at the same time send data to the server. It's like GET + data sending capabilities.
RESPONSE
Response: Contains the actual document requested by the client. (Or error codes if the request cannot be processed.)
Image sources: Headfirst JSP and Servlets Book
Part 2: http://sandsations.blogspot.hk/2012/08/understanding-web-servers-part-2.html
0 comments:
Post a Comment