Request and Response
Although the basic concepts behind servlets are protocol-independent, servlets are optimized to work with request/response protocols, such as HTTP. HTTP is a simple protocol. A client sends a request to a server and the server sends a response back to the client. The HTTP protocol is stateless, that is, the protocol treats each request and response independently. The protocol does not associate a given request with previous requests from the client or responses from the server.
The servlet container represents these concepts directly. Each time a client sends a request to a servlet, the container provides the servlet with a request object and a response object. The request object encapsulates the request from the client. The response object provides a suite of functions for creating a response.