HttpSession session=request.getSession(); session.setAttribute("online",user); //当前的登录用户名 session.setAttribute("quanxian",flag); //当前用户的权限
response.sendRedirect("mainindex2.jsp?name="+user+""); //用户的跳转
response.sendRedirect("error.jsp");