就是把你第一次的local改为localhost或127.0.0.1就可以了
数据库表在最上面:只有两行:
数据库里有数据,只有两行:测试的:现在我又改了,还是不行:
出错如下:
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Exception in JSP: /index.jsp:6
3: <jsp:useBean id="conn" scope="page" class="firm.firm"/>
4: <%//st=conn.createStatement();
5: String sql="select * from Guest_Book";
6: ResultSet rs=conn.executeQuery(sql);
7: //ResultSet executeQuery(String sql);
8: //String ID=rs.getString("ID");
9: //while(rs.next()){
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
firm.firm.executeQuery(firm.java:68)
org.apache.jsp.index_jsp._jspService(index_jsp.java:60)
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.17 logs.
[此贴子已经被作者于2006-9-18 12:53:41编辑过]