如图:
<div class="megas512" style="margin-top: 15px;">
<div>
<a href="selectByPageId_User.shtml?currentPage=1">首页</a>
<a href="selectByPageId_User.shtml?currentPage=<%=session.getAttribute("prepage")%>">上一页</a>
<a href="selectByPageId_User.shtml?currentPage=<%=session.getAttribute("nextpage")%>">下一页</a>
<a href="selectByPageId_User.shtml?currentPage=totalPage">尾页</a>
</div>
</div>
因为我页面第一次进入的时候方法走的不是分页查询的方法,导致上一页、下一页显示为null,这个应该如何进行判断,就是当上一页、下一页里面的session值为null的时候,分别赋值1和2.拜托。想了很久,就是没有想出来应该怎么搞。