首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Web开发 >

大家帮忙看看resultset如何用

2013-09-11 
大家帮忙看看resultset怎么用exceptionorg.apache.jasper.JasperException: An exception occurred proces

大家帮忙看看resultset怎么用
exception

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

28: </form>
29: <%
30: ResultSet rs=DBHelper.executeQuery("select * from ti_st");
31: if(rs.wasNull())
32: out.print(1);
33:
34:


Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:567)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:471)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:389)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:333)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
root cause

java.lang.NullPointerException
org.apache.jsp.dbtest_jsp._jspService(dbtest_jsp.java:99)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:433)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:389)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:333)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

[解决办法]
空指针啊,ResultSet rs=DBHelper.executeQuery("select * from ti_st") 这里能查到数据?
我的异常网推荐解决方案:An exception occurred processing JSP page,http://www.myexception.cn/j2se/33144.html

热点排行