detail.jsp里为什么抛出空指针异常了?求解? HTTP Status 500 - java.lang.NullPointerException

来源:8-8 使用Cookie实现保存商品浏览记录

笑李藏刀

2016-10-23 11:24

HTTP Status 500 - java.lang.NullPointerException

type Exception report

message java.lang.NullPointerException

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.handleJspException(JspServletWrapper.java:565)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:481)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

root cause

java.lang.NullPointerException
org.apache.jsp.details_jsp._jspService(details_jsp.java:241)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

note The full stack trace of the root cause is available in the Apache Tomcat/8.5.5 logs.

Apache Tomcat/8.5.5


写回答 关注

3回答

  • sakura酱
    2016-10-25 13:06:53

    你还是把代码贴上来吧,这只能看出你details241行有错,我觉得肯定是你哪不细心写错了,看不见代码谁知道你什么错。。

  • 笑李藏刀
    2016-10-23 19:05:23

    可以连接呀

  • 好困可是还是要敲代码
    2016-10-23 12:02:14

    加一下jar包看看,先用数据库连接类的main函数测试下数据库能不能连接

    笑李藏刀

    可以连接呀

    2016-10-23 19:05:54

    共 1 条回复 >

JAVA遇见HTML——JSP篇

Java Web入门级教程JSP,带你轻松的学习JSP基础知识

248278 学习 · 3071 问题

查看课程

相似问题