Which of the following statement correctly store an object associated with a name at a place where all the servlets/jsps of the same webapp participating in a session can access it? Assume that request, response, name, value etc. are references to objects of appropriate types.(Choose one)

Which of the following statement correctly store an object associated with a name at a place where all the servlets/jsps of the same webapp participating in a session can access it? Assume that request, response, name, value etc. are references to objects of appropriate types.(Choose one)




a. request.getSession().setAttribute(name, value);
b. response.setAttribute(name, value);
c. request.setAttribute(name, value);
d. request.setParameter(name, value)


Answer: A


Learn More :