今天在做一个留言板分页显示
在当前页面跳转到下一页的问题
<a href="liuyan4.jsp? currentPage=1" >首页</a>
<a href="liuyan4.jsp? currentPage=<%=currentPage-1%>">上一页</a>
<a href="liuyan4.jsp? currentPage=<%=currentPage+1%>">下一页</a>
<a href="liuyan4.jsp? currentPage=<%=mybean.getSumPage()%>">尾页</a>
但是很遗憾,点击界面下一页并没有跳转
解决办法:
<a href="liuyan4.jsp?currentPage=1" >首页</a>
<a href="liuyan4.jsp?currentPage=<%=currentPage-1%>">上一页</a>
<a href="liuyan4.jsp?currentPage=<%=currentPage+1%>">下一页</a>
<a href="liuyan4.jsp?currentPage=<%=mybean.getSumPage()%>">尾页</a>
jsp后面的问号后面不要有空格 就可以正常运行了