严重: Servlet.service() for servlet jsp threw exception java.lang.NumberFormatException: null
Theserverencounteredaninternalerror()thatpreventeditfromfulfillingthisrequest.excepti...
The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: An exception occurred processing JSP page /movieone.jsp at line 8
5: Statement stmt=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
6: %>
7: <%
8: int id=Integer.parseInt(request.getParameter("id"));
9: String sql="select * from comment where id=?";
10: PreparedStatement pstm=conn.prepareStatement(sql);
11: pstm.setInt(1,id);
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:505)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:416)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 展开
exception
org.apache.jasper.JasperException: An exception occurred processing JSP page /movieone.jsp at line 8
5: Statement stmt=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
6: %>
7: <%
8: int id=Integer.parseInt(request.getParameter("id"));
9: String sql="select * from comment where id=?";
10: PreparedStatement pstm=conn.prepareStatement(sql);
11: pstm.setInt(1,id);
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:505)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:416)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 展开
3个回答
展开全部
错误信息不完整,可能是id没有获取到,也可能是获取的id不是数字等……
追问
加我好么,小白一个,为了期末作业头很痛啊啊啊啊、。。。2252815308,谢谢了哇
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
你的后台是
HttpServletRequest request = ServletActionContext.getRequest();
request.setAttribute("id", s);
这样传值的吗?如果是,那就是s标志的地方你传的是空值,如果不是可能你的传输方式有误。
你可以在后台先打印一下,看是否是有值的
HttpServletRequest request = ServletActionContext.getRequest();
request.setAttribute("id", s);
这样传值的吗?如果是,那就是s标志的地方你传的是空值,如果不是可能你的传输方式有误。
你可以在后台先打印一下,看是否是有值的
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询