500错误~~哪位高手进来给瞅一眼。。?谢谢!
先贴错误,完整如下:
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:
java.lang.NullPointerException org.apache.jasper.servlet.JspServletWrapper.handle
JspException(JspServletWrapper.java:491)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:419)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
java.lang.
NullPointerException org.apache.jsp.JSP.list_jsp._jspService(list_jsp.java:87)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.29 logs.
--------------------------------------------
Apache Tomcat/6.0.29
javabean代码也贴上来方便研究:
package book;
import java.sql.*;
public class conn{
String sDBDriver="sun.jdbc.odbc.JdbcOdbcDriver";
String sConnStr="jdbc:odbc:book";
Connection connect=null;
ResultSet rs=null;
public conn(){
try{
Class.forName(sDBDriver);
}
catch(
java.lang.ClassNotFoundException e){
System.err.println(e.getMessage());
}
}
public ResultSet executeQuery(String sql){
try{
connect=DriverManager.getConnection(sConnStr);
Statement stmt=connect.createStatement();
rs=stmt.executeQuery(sql);
}
catch(
SQLException ex){
System.err.println(ex.getMessage());
}
return rs;
}
}
哪里的问题捏??javabean也已经生成class文件啦,也放到该放的位置啦,怎么还会有错误呢?
------解决方案--------------------
ResultSet RS_result=connDBbean.executeQuery("select * from mybook");
代码不全,无法准确判断。
是否在该处,请经验RS_result的值。
------解决方案--------------------
设置断点,按F6,一步步的往下走
我的异常网推荐解决方案:The server encountered an internal error () that prevented it from fulfilling this request.,http://www.aiyiweb.com/java-web/317.html