In servlets, getAttribute() and setAttribute() are only associated with HttpSession, ServletRequest and ServletContext, i.e attributes are defined only for context, request and session scopes. Why not for, say, ServletResponse or ServletConfig?
In servlets, getAttribute() and setAttribute() are only associated with HttpSession , ServletRequest and ServletContext
Share
init-paramsdefined in web.xml.HttpServletResponsewill not avail anything, and neither it will make any sense, as response is for the client — not from the client, i.e. browser, and that is not capable of understanding that, nonetheless. And you must understand that JSP and Servlet both run on server-side, whatsoever. Hence, settng attributes torequestin servlet and getting those in JSP, doesn’t involve the client at all.