Using the request object's setAttribute() method, we can set the attributes for the jsp page to which we can finally write out the response. We do this using the requestDispatcher object.
What I dont understand is, the attributes being printed on the next jsp page is actually a part of the response. Then why is the setAttribute() method in the ServletRequest interface, and not the ServletResponse interface?
Attributes, Parameters are a way of passing some information to the Server- So they are part of the HttpServletRequest. Response is what the server sends back to the client- and this would involve- the result from the server which are part of HttpServletResponse.