<%
} www.2cto.com
%>
</table>
UserDL.java是个专门用于分页的Servlet
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
System.out.println("通过Servlet分页");
String s_pageNow = request.getParameter("pageNow");
UserBeanDL ubd = new UserBeanDL();
try{
int pageNow = Integer.parseInt(s_pageNow);
ArrayList al = ubd.getUsersByPage(pageNow);
int pageCount = ubd.getPageCount();
request.setAttribute("pageNow", pageNow);
request.setAttribute("result", al);
request.setAttribute("pageCount", pageCount + "");
request.getRequestDispatcher("threedown/welcome.jsp").forward(request, response);
}catch(Exception e){
e.printStackTrace();
}
}