求哪位大神看看代码为什么就报错了呢?
<jsp:include page="../cust/top.jsp" /><table width=750 align="center" border=0 class=td>
<tr>
<td width=25% valign="top">
<jsp:include page="declare.jsp" /><br />
<jsp:include page="login.jsp" />
</td>
<td width=75% valign="top">
<!-- 精品图书 -->
<table width=100% border=0 class=td>
<tr>
<td colspan=2 align="left">
<img src="img/lanmu_r1.jpg" width=85 height=29 />
</td>
</tr>
<%
int i_num = 2;
rs = stmt.executeQuery("select * from book left join publisher on book.publisherid=publisher.publisherid where type=2");
while (rs.next() && i_num > 0) {
i_num--;
String s_bookid = rs.getString("bookid");
String s_bookname = rs.getString("bookname");
String s_author = rs.getString("author");
String s_pubdate = rs.getString("pubdate").substring(0, 10);
String s_price = rs.getString("price");
String s_content = rs.getString("content");
String s_picture = rs.getString("picture");
String s_pubname = rs.getString("name");
%>
<tr>
<td width=30%>
<table bgcolor=#98dacf border=0 class=td>
<tr>
<td>
<a href="cust/bookdetail.jsp?bookid=<%=s_bookid%>"> <img
src="img/<%=s_picture%>" width=65 height=90 border=0 /> </a>
</td>
<td>
<table border=0 class=td>
<tr>
<td width=25%>
书名
</td>
<td>
<%=s_bookname%>
</td>
</tr>
<tr>
<td width=25%>
作者
</td>
<td>
<%=s_author%>
</td>
</tr>
<tr>
<td width=25%>
出版社
</td>
<td>
<%=s_pubname%>
</td>
</tr>
<tr>
<td width=25%>
出版日期
</td>
<td>
<%=s_pubdate%>
</td>
</tr>
<tr>
<td width=25%>
定价
</td>
<td>
¥<%=s_price%>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan=2>
<a href="cust/addtocart.jsp?bookid=<%=s_bookid%>">放入购物车</a>
<a href="cust/bookdetail.jsp?bookid=<%=s_bookid%>">查看详情</a>
</td>
</tr>
</table>
</td>
加入一下代码后就出错了!!!!
<%
if (!rs.isLast()) {//是否是最后一条记录
rs.next();
s_bookid = rs.getString("bookid");
s_bookname = rs.getString("bookname");
s_author = rs.getString("author");
s_pubdate = rs.getString("pubdate").substring(0, 10);
s_price = rs.getString("price");
s_content = rs.getString("content");
s_picture = rs.getString("picture");
s_pubname = rs.getString("name");
%>
<td width=30%>
<table bgcolor=#54ca21 border=0 class=td>
<tr>
<td>
<a href="cust/bookdetail.jsp?bookid=<%=s_bookid%>"> <img
src="img/<%=s_picture%>" width=65 height=90 border=0 /> </a>
</td>
<td>
<table border=0 class=td>
<tr>
<td width=25%>
书名
</td>
<td>
<%=s_bookname%>
</td>
</tr>
<tr>
<td width=25%>
作者
</td>
<td>
<%=s_author%>
</td>
</tr>
<tr>
<td width=25%>
出版社
</td>
<td>
<%=s_pubname%>
</td>
</tr>
<tr>
<td width=25%>
出版日期
</td>
<td>
<%=s_pubdate%>
</td>
</tr>
<tr>
<td width=25%>
定价
</td>
<td>
¥<%=s_price%>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan=2>
<a href="cust/addtocart.jsp?bookid=<%=s_bookid%>">放入购物车</a>
<a href="cust/bookdetail.jsp?bookid=<%=s_bookid%>">查看详情</a>
</td>
</tr>
</table>
</td>
<%
}
%>
</tr>
<%
}
%>
</table>
一下是错误页面
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: ??????????????
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:867)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:800)
org.apache.jsp.cust.index_jsp._jspService(index_jsp.java:532)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
root cause
com.microsoft.sqlserver.jdbc.SQLServerException: ??????????????
com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:171)
com.microsoft.sqlserver.jdbc.SQLServerResultSet.throwNotScrollable(SQLServerResultSet.java:375)
com.microsoft.sqlserver.jdbc.SQLServerResultSet.verifyResultSetIsScrollable(SQLServerResultSet.java:398)
com.microsoft.sqlserver.jdbc.SQLServerResultSet.isLast(SQLServerResultSet.java:1185)
org.apache.jsp.cust.index_jsp._jspService(index_jsp.java:204)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
note The full stack trace of the root cause is available in the Tomcat logs.