专业
response.setCharacterEncoding("UTF-8");
request.setCharacterEncoding("UTF-8");
Page pager=(Page)request.getAttribute("pager");
List subResult=(List)request.getAttribute("subResult"); if(!subResult.isEmpty()){
for(int i=0;i
StudentInfo st=subResult.get(i);
out.print("
");out.print("
"+st.getId()+"");out.print("
"+st.getName()+"");out.print("
"+st.getAge()+"");out.print("
"+st.getGender()+"");out.print("
"+st.getMajor()+"");%>
删除href="AllServlet?id=&name=&methodName=">修改
out.print("
");}
}
%>
总条记录|总页
|当前页|每页条|
int last=pager.getCurrentRecord()-pager.getPageSize();
int next=pager.getCurrentRecord()+pager.getPageSize();
int currentRecord;
if(last<0){
out.println("首页|");
}
else{
out.print("上一页|");
}