用jsp写了一个分页,可显示是是从第0页开始的,而我想从第一页开始该怎么修改。 10

补充问题:添加的数据在数据库中可以看到,可在页面上却看不到,这是怎么回事,求解释!!!<c:choose><c:whentest="${requestScope.page... 补充问题:添加的数据在数据库中可以看到,可在页面上却看不到,这是怎么回事,求解释!!!
<c:choose>
<c:when test="${requestScope.page.pageCount <= 6}">
<c:forEach begin="1" end="${requestScope.page.pageCount}" var="s" varStatus="status">
<c:choose>
<c:when test="${requestScope.page.pageNo==status.index}">
<a href="servlet/ListProductServlet?pageNo=${ status.index}" style="color:red;">[${ status.index}]</a>
</c:when>
<c:otherwise>
<a href="servlet/ListProductServlet?pageNo=${ status.index}">[${ status.index}]</a>
</c:otherwise>
</c:choose>
</c:forEach>
</c:when>
<c:otherwise>
<c:choose>
<c:when test="${requestScope.page.pageNo <= 3}">
<c:forEach begin="1" end="9" varStatus="status">
<c:choose>
<c:when test="${requestScope.page.pageNo==status.index}">
<a href="servlet/ListProductServlet?pageNo=${ status.index}" style="color:red;">[${ status.index}]</a>
</c:when>
<c:otherwise>
<a href="servlet/ListProductServlet?pageNo=${ status.index}">[${ status.index}]</a>
</c:otherwise>
</c:choose>
</c:forEach>
</c:when>
<c:when test="${requestScope.page.pageNo > (requestScope.page.pageCount-3)}">
<c:forEach begin="${requestScope.page.pageCount-3}" end="${requestScope.page.pageCount}" varStatus="status">
<c:choose>
<c:when test="${requestScope.page.pageNo==status.index}">
<a href="servlet/ListProductServlet?pageNo=${ status.index}" style="color:red;">[${ status.index}]</a>
</c:when>
<c:otherwise>
<a href="servlet/ListProductServlet?pageNo=${ status.index}">[${ status.index}]</a>
</c:otherwise>
</c:choose>
</c:forEach>
</c:when>
<c:otherwise>
${page.pageNo}
<c:forEach begin="${requestScope.page.pageNo}" end="${requestScope.page.pageNo + 3}" varStatus="status">
${page.pageNo}
<c:choose>
<c:when test="${requestScope.page.pageNo==status.index}">
<a href="servlet/ListProductServlet?pageNo=${ status.index}" style="color:red;">[${ status.index}]</a>
</c:when>
<c:otherwise>
<a href="servlet/ListProductServlet?pageNo=${ status.index}">[${ status.index}]</a>
</c:otherwise>
</c:choose>
</c:forEach>
</c:otherwise>
</c:choose>
</c:otherwise>
</c:choose>
展开
 我来答
匿名用户
2012-05-29
展开全部
<c:forEach begin="${requestScope.page.pageCount-3}" end="${requestScope.page.pageCount}" varStatus="status">

<c:forEach begin="${requestScope.page.pageCount-2}" end="${requestScope.page.pageCount}" varStatus="status">
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式