首页上一页 1 下一页尾页 2 条记录 1/1页
关于jsp项目开发实录03错误
发表在JavaWeb图书答疑
2010-09-14
是否精华
是
否
版块置顶:
是
否
电子商城这个index.jsp就报错org.apache.jasper.JasperException: Exception in JSP: /index.jsp:6
3: <%@page import="java.util.*"%>
4: <%@page import="com.wy.domain.GoodsForm" %>
5: <jsp:useBean id="newGood" scope="page" class="com.wy.dao.GoodsDao"/>
6: <%List nowList =newGood.selectMark(Integer.valueOf("0"));%>
7: <%List freeList =newGood.selectMark(Integer.valueOf("1"));%>
8: <html>
9: <head>
java.lang.NullPointerException
com.wy.dao.GoodsDao.selectMark(GoodsDao.java:52)
org.apache.jsp.index_jsp._jspService(index_jsp.java:59)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
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:729)
tb_goods里mark是bit型,sql数据库里只能写false,true的boolean类型,在GoodsForm里mark又定义成integer类型,在GoodsDao.java里mark.intValue()是转不成的,请问老板怎么改??
3: <%@page import="java.util.*"%>
4: <%@page import="com.wy.domain.GoodsForm" %>
5: <jsp:useBean id="newGood" scope="page" class="com.wy.dao.GoodsDao"/>
6: <%List nowList =newGood.selectMark(Integer.valueOf("0"));%>
7: <%List freeList =newGood.selectMark(Integer.valueOf("1"));%>
8: <html>
9: <head>
java.lang.NullPointerException
com.wy.dao.GoodsDao.selectMark(GoodsDao.java:52)
org.apache.jsp.index_jsp._jspService(index_jsp.java:59)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
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:729)
tb_goods里mark是bit型,sql数据库里只能写false,true的boolean类型,在GoodsForm里mark又定义成integer类型,在GoodsDao.java里mark.intValue()是转不成的,请问老板怎么改??