In JSP page we can access to attributes using this: ${name}. But if we in sevlet do the following:
req.getSession.setAttribute("name", sessionName );
getServletContext().setAttribute("name", sevletContextName)
req.setAttribute("name", reqName);
then which variable JSP will access when use ?
${name}
The JSP EL looks in page, then request, then session, then application.
If you want to access the session explicitely, use
For the servlet context, use
(and similarly for
pageScopeandrequestScope)