Exemple #1
0
 public String login() {
   HttpSession session = request.getSession();
   Student currentUser = studentDao.login(student);
   if (currentUser != null) {
     session.setAttribute("currentUser", currentUser);
     s = "1";
     return SUCCESS;
   } else {
     error = "用户名或密码错误!";
     return ERROR;
   }
 }