JSP and SERVLET objects to set and get attributes


SERVLET getServletContext().setAttribute(“foo”, barObj); 
JSP : application.setAttribute(“foo”, barObj);

SERVLET : request.setAttribute(“foo”, barObj); 
JSP : request.setAttribute(“foo”, barObj);

SERVLET : request.getSession().setAttribute(“foo”, barObj); 
JSP : session.setAttribute(“foo”, barObj);

SERVLET Does not apply! 
JSP : pageContext.setAttribute(“foo”, barObj);