HTTP Status 500 - --------------------------------------------------------------------------------type Exception reportmessage description The server encountered an internal error () that prevented it from fulfilling this request.exception org.apache.jasper.JasperException: Exception in JSP: /jdtw/vote/showquestion.jsp:3330: ResultSet rs,rs1,rs2;
31: String question = null,item = null,sql1;
32: String sql = "SELECT Question,QuestionID from VQuestions where IsVisable = 1 ";
33: rs = stmt.executeQuery(sql);
34:
35: int questionid = 0,itemid = 0;
36: int i=0,j; //题目及选项标号
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause java.lang.NullPointerException
org.apache.jsp.jdtw.vote.showquestion_jsp._jspService(showquestion_jsp.java:85)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.16 logs.
--------------------------------------------------------------------------------Apache Tomcat/5.5.16
是连接数据库的问题还是什么问题???小弟初学,望各位大虾推小弟一把......
31: String question = null,item = null,sql1;
32: String sql = "SELECT Question,QuestionID from VQuestions where IsVisable = 1 ";
33: rs = stmt.executeQuery(sql);
34:
35: int questionid = 0,itemid = 0;
36: int i=0,j; //题目及选项标号
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause java.lang.NullPointerException
org.apache.jsp.jdtw.vote.showquestion_jsp._jspService(showquestion_jsp.java:85)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.16 logs.
--------------------------------------------------------------------------------Apache Tomcat/5.5.16
是连接数据库的问题还是什么问题???小弟初学,望各位大虾推小弟一把......
解决方案 »
- 大家帮忙看看,是不是系统中毒了???在线等,急,急。。
- ssh的问题。。帮帮我新手。。谢谢哦
- CSDN首页的图片广告特效
- 请问各路大虾tomcat 的 localhost不能自动生成 为什么?
- 关于SwitchAction的使用方法
- JSP新手:不知道如何取得Access的物理路径.
- 如果用servlet的doPost()方法返回一个几千行的文本行吗,会出什么问题吗?
- 谁能给我SQL SERVER的jdbc驱动啊?要么给我一个肯定能下载的地方。
- tomcat4,上传已经ok,又有新问题:修改的时候要重传商品图片,怎么把原来的删除,换掉新的?
- 怎样实现在浏览器页面单击一个按钮后弹出选择本地文件的浏览对话框?急!!在线等待。
- 关于jsp在线编辑器
- 读取文件的问题
<%@page contentType="text/html;charset=GBK"%>
<%@page import="java.sql.*"%>
<jsp:useBean id="DBConn" scope="page" class="dreamtime.dreamnews.DBConnection"/>
<html>
<head>
<title>
在线答题
</title>
<LINK href="style.css" rel=stylesheet>
</head>
<body>
<%
Connection conn=null; //连接对象
Statement stmt=null,stmt1=null; //语句对象
try
{
conn = DBConn.getConn();
stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
stmt1 = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
}
catch(Exception e)
{
out.println(e.getMessage());
}
%>
<form action = vote/thanks.jsp method="post"> <%
ResultSet rs,rs1,rs2;
String question = null,item = null,sql1;
String sql = "SELECT Question,QuestionID from VQuestions where IsVisable = 1 ";
rs = stmt.executeQuery(sql);
int questionid = 0,itemid = 0;
int i=0,j; //题目及选项标号
try
{
while(rs.next())
{
i++;
question = rs.getString(1);
questionid= rs.getInt(2);
out.print("<TABLE borderColor=#999999 cellSpacing=0 cellPadding=0 width=100% border=0><tr><td><font size='1' color='red'><strong>"+" "+i+"."+" "+question+"</strong></font></td></tr>");
sql1 = "SELECT Item,ItemID From VItems Where QuestionID ="+questionid;
rs1 = stmt1.executeQuery(sql1);
j = 0;
while(rs1.next())
{
j++;
item = rs1.getString(1);
itemid = rs1.getInt(2);
%>
<td > <font size="1" color="blue">[<%=j%>]<input type=radio value="<%=itemid%>" name="<%=questionid%>" <%if(j<2) {out.print(" checked "+j);}%>><%=item%></font></td></tr>
<%
}
out.print(" </table><p>");
}
}
catch(Exception e)
{
out.println(e.getMessage());
}%><hr>
<div align=center><INPUT class=buttonface type=submit value=提交 name=Submit>
<INPUT class=buttonface type=reset value=重选 name=Submit2>
</div>
</form></body>
</html>