首页上一页 1 下一页尾页 2 条记录 1/1页
《JSP网络开发实例自学手册》书第六章中项目运行问题反馈
发表在JavaWeb图书答疑
2009-04-15
是否精华
是
否
版块置顶:
是
否
老师:
您好!
我现将《JSP网络开发实例自学手册》书中第六章项目正确导入后运行(除更换项目名称,其它未作任何修改), 出现以下错误信息,我已更新SQL SERVER 2000SP4与windows所有补丁,同时我知道java.lang.NullPointerException错误信息主要由两种原因造成-连接数据库语句与未正确配置数据源等,但我是将原项目完全正确导入,理论上讲不存在此两方面问题,请速老师明示!谢谢!!!
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: Exception in JSP: /login.jsp:13
10:
11: ResultSet rs=rst.getResult(str);//执行SQL语句获得结果集对象
12: session.setAttribute("isLog",new String("0"));//判断用户是否登录,当isLog的属性为0时,说明用户并没有登录
13: if (!rs.next())//结果集没有找到所要查找的行
14: {
15: out.println("<script language='javascript'>alert('用户名或密码错误');"+
16: "parent.location.href='index.jsp';</script>");
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:451)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause
java.lang.NullPointerException
org.apache.jsp.login_jsp._jspService(login_jsp.java:74)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.26 logs.
--------------------------------------------------------------------------------
Apache Tomcat/5.5.26
您好!
我现将《JSP网络开发实例自学手册》书中第六章项目正确导入后运行(除更换项目名称,其它未作任何修改), 出现以下错误信息,我已更新SQL SERVER 2000SP4与windows所有补丁,同时我知道java.lang.NullPointerException错误信息主要由两种原因造成-连接数据库语句与未正确配置数据源等,但我是将原项目完全正确导入,理论上讲不存在此两方面问题,请速老师明示!谢谢!!!
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: Exception in JSP: /login.jsp:13
10:
11: ResultSet rs=rst.getResult(str);//执行SQL语句获得结果集对象
12: session.setAttribute("isLog",new String("0"));//判断用户是否登录,当isLog的属性为0时,说明用户并没有登录
13: if (!rs.next())//结果集没有找到所要查找的行
14: {
15: out.println("<script language='javascript'>alert('用户名或密码错误');"+
16: "parent.location.href='index.jsp';</script>");
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:451)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause
java.lang.NullPointerException
org.apache.jsp.login_jsp._jspService(login_jsp.java:74)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.26 logs.
--------------------------------------------------------------------------------
Apache Tomcat/5.5.26