There are two things which this could pertain to:
- The HTTP Request
- The HttpServletRequest object
HTTP Request
HTTP is a request/response protocol. This means that the browser sends a request to the server. This means a TCP/IP connections is opened for the duration of the request. When an HTTP response is sent, the server or the browser closes the TCP/IP connection. That is the end of the HTTP request/response chain. You can now see the response (containing data and a header). HTTP is stateless, so nothing else is kept.
HttpServletRequest
This object is created and populated with request data by the container (server) when the request is made. Its lifecycle depends completely on the container implementation. It may choose to pool HttpServletRequest objects, or it may choose to discard them when the response is sent. As for its attributes, they will be discarded along with the HttpServletRequest object unless the attribute is an object with references in other objects. IF another object still has a reference to the object which is also a request attribute, it will continue to exist.
Note
Do not mistake request dispatch actions (like servlet->
JSP) with a response commit. The response is not committed and the request lifecycle is not over. The request is still completely valid in a JSP because a JSP is just another
servlet that happens to put a bunch of html into the response without having to write a a lot of ugly, useless code. The response is only committed after the JSP is processed.