jsp报错-loginProcess.jsp at line 29

type Exception report

message An exception occurred processing JSP page /loginProcess.jsp at line 29

description The server encountered an internal error that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: An exception occurred processing JSP page /loginProcess.jsp at line 29

26:

27: List> alist=db.list(sql);
28: int temp=0;
29: for(int i=0;i<alist.size();i++){
30: String str=alist.get(i).get("num").toString();
31: temp=Integer.parseInt(str);
32: }

Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:568)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:470)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
root cause

java.lang.NullPointerException
org.apache.jsp.loginProcess_jsp._jspService(loginProcess_jsp.java:90)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)

3个回答

这个我也指点不了啊,你debug下程序,单步执行看看变量的值

蝴蝶姐姐话费哈哈哈哈回家

跟踪下程序,提示是空指针错误的

Sev_LLLLL
Sev_LLLLL 回复修巴利耶: 求指点
4 年多之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问