(String)session.getAttribute("xxx"))居然报错!!!!!
错误如下:
org.apache.jasper.JasperException: Exception in JSP: /checklogin.jsp:57
.
.
57:String userid=(String)session.getAttribute( "userid ");
.
.
.
root cause
java.lang.ClassCastException: java.lang.Integer
------解决方案--------------------userid 是 Integer 类型的
String userid=(Integer)session.getAttribute( "userid ").toString();