大家帮忙看看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.handle
JspException(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.aiyiweb.com/j2se/33144.html