Servlet Session 1.2
Servlet Session 1.2
The web container is responsible to handle the request. Let's see how it handles the
request.
o The public service method internally calls the protected service method
o The protected service method calls the doGet method depending on the type of
request.
o The doGet method generates the response and it is passed to the client.
o After sending the response, the web container deletes the request and response
objects. The thread is contained in the thread pool or deleted depends on the
server implementation.
1. When User sends request for a servlet by clicking a link that has URL to a
servlets.
a. HttpServletRequest
b. HttpServletResponse
3. Then the container creates or allocates a thread for that request and calls the
Servlet's service() method and passes the request, response objects as
arguments.