String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
My JSP 'manger.jsp' starting pagetable{ border-collapse:collapse; }
td{ border:#ccc solid 1px; padding:5px; }
String userName = (String) request.getSession().getAttribute("userName");
if (userName == null) {
response.sendRedirect("login.jsp?erro=1");
}
if (request.getParameter("pageNow") != null) {
pageNow = Integer.parseInt(request.getParameter("pageNow"));
}
%>
欢迎
登录
军训10天会晒得很黑吗
UserDao userDao = new UserDao();
int pageNum = userDao.getPageNum();
ArrayList list = userDao.fenyeInfo(pageNow);
int countPage = userDao.getCounPage();
%>
用户ID | 用户名 | 密码 | 用户类型 |
---|
for (int i = 0; i < list.size(); i++) {
out.println("
" + list.get(i).getUserId() + "");out.println("
" + list.get(i).getUserName() + "");out.println("
" + list.get(i).getPassW() + "");out.println("
" + list.get(i).getGrade() + "");}
%>
if (pageNow != 1) {
");}
int start;
if(pageNow < pageNum){
start = 1;
}else{
start = pageNow - 10 + 1;
}
for (int i = start; i <= countPage && i <= pageNow + pageNum; i++) {
if(i == pageNow){
out.println(i);黑眼圈用什么才可以消掉
continue;
}
out.println("[" + i
+ "]");
}
if (pageNow != countPage) {
");}
%>