java中jdbc数据库连接连接不上 出现错误
org.apache.jasper.JasperException:java.lang.NullPointerExceptionorg.apache.jasper.ser...
org.apache.jasper.JasperException: java.lang.NullPointerException
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:549)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:470)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
root cause
java.lang.NullPointerException
org.apache.jsp.testConnMysql_jsp._jspService(testConnMysql_jsp.java:76)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
noteThe full stack trace of the root cause is available in the
Apache Tomcat/7.0.37 logs. 展开
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:549)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:470)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
root cause
java.lang.NullPointerException
org.apache.jsp.testConnMysql_jsp._jspService(testConnMysql_jsp.java:76)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
noteThe full stack trace of the root cause is available in the
Apache Tomcat/7.0.37 logs. 展开
4个回答
展开全部
你的testConnMysql.jsp出空指针异常了,不像是数据库的问题。你看看你的servlet中,是不是什么值没取到。你debug看看
更多追问追答
追问
我是新手啊您能不能讲的简单一懂点啊大哥
追答
*FROM 。*后面有空格,sql错误,结果集里没数据,导致你没查出数据,你又没加判断,取name,sex,address出错。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
前台取值的时候你通过EL或者标签库语言时,获取的值是空,或者后台没有放在HttpServletRequest,或者HttpSession范围内
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
as we can see:
java.lang.NullPointerException
org.apache.jsp.testConnMysql_jsp._jspService(testConnMysql_jsp.java:76)
少年,把testConnMysql.jsp 贴一下,尤其是76行附近,有个空指针,贴出jsp文件看看
java.lang.NullPointerException
org.apache.jsp.testConnMysql_jsp._jspService(testConnMysql_jsp.java:76)
少年,把testConnMysql.jsp 贴一下,尤其是76行附近,有个空指针,贴出jsp文件看看
追问
");
}
c.close();
%>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |