如下代码所示:
<%
if (request.getSession().getAttribute("stus") != null) {
List stus = (List) session.getAttribute("stus");
Iterator iter = stus.iterator(); //报错行
%>
<table cellspacing="0" border="1px" align="center">
<tr><th>序号</th><th>学号</th><th>姓名</th><th>班级</th><th>修改</th><th>删除</th></tr>
<%
int i = 1;
while(iter.hasNext()){
Student student = (Student) iter.next();
%>
运行时该行抛出空指针异常,查看了Servlet类,也检查了这个JSP文件,不知道什么原因,请大神帮忙看下,哪儿出了问题?谢谢!