JSP的异常。

来源:百度知道 编辑:UC知道 时间:2024/06/01 07:00:01
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>
不知道为什么会出错。
改成<%List nowList = newGood.selectMark(Integer.valueOf("0"));%>还是有错误。

为什么要加Integer.valueOf("0"),直接selectMark(0)就是一个意思吗?它应该能把0直接认为是整型的。
还有,你前面没import的话,
得是java.util.List nowList...

String.valueOf(0);
Integer.parentInt("0");

这用的。。。。。。。。。