java项目出现500错误是什么原因

HTTPStatus500-typeExceptionreportmessagedescriptionTheserverencounteredaninternalerro... HTTP Status 500 -
type Exception report
message
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 /deletexuan.jsp at line 56

53: <%
54: String s="select * from xuan";
55: ResultSet rs=Li.getRs(s);
56: while(rs.next()){
57: out.print("<form action='DelScoreServlet'>");
58: String ss=rs.getString("xname");
59: out.print("<tr><td>"+ss+"</td><td>");

Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:505)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:416)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

root cause
java.lang.NullPointerException
org.apache.jsp.deletexuan_jsp._jspService(deletexuan_jsp.java:121)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

note The full stack trace of the root cause is available in the Apache Tomcat/6.0.16 logs.
Apache Tomcat/6.0.16
展开
 我来答
Dan_Ting_
2013-12-02
知道答主
回答量:25
采纳率:0%
帮助的人:9.6万
展开全部
54: String s="select * from xuan";
55: ResultSet rs=Li.getRs(s);
56: while(rs.next()){

检查下Li和rs是不是为空
追问
那个DBHandler里面设的rs就是为空,改了是不是就好了?Li是jsp:useBean的id啊,不是空啊
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式