request.getAttribute("the name you have used in servlet class");
Eg:
In servlet class
Boolean flag=true;
In servlet class request.setAttribute("sessVariable", flag);
In JSP page;
Boolean value = (Boolean)request.getAttribute("sessVariable");
NOTE: whater type of Object you have set to request, while retrieving you have to do the casting of same type. otherwise, you will be getting ClassCastException.
but it is showing the following error message....
SEVERE: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: /StudentDetails.jsp(3,0) According to TLD or attribute directive in tag file, attribute value does not accept any expressions
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
See, you're adding this attribute to your HttpServletRequest:
and you're accessing the attribute this way in your EL:
Excuse-me if I'm being ignorant, but shouldn't you actually need to use the value stored in the StudentConstants.STUDENT_LIST constant to retrieve the request attribute from the EL statement?