日期:2014-05-18 浏览次数:20746 次
if (radio.equals(0)) {0表示为管理员,1表示教室,2表示学生,3表示游客,
if (userFromDB != null && password != null) {
if (userFromDB.getPassword().equals(password)) {
if (userFromDB.getType().equals(radio)) {
forward = mapping.findForward("manager");
}
}
}
} else if (radio.equals(1)) {
if (userFromDB != null && password != null) {
if (userFromDB.getPassword().equals(password)) {
if (userFromDB.getType().equals(radio)) {
forward = mapping.findForward("teacher");
}
}
}
} else if (radio.equals(2)) {
if (userFromDB != null && password != null) {
if (userFromDB.getPassword().equals(password)) {
if (userFromDB.getType().equals(radio)) {
forward = mapping.findForward("welcome");
}
}
}
} else if (radio.equals(3)) {
forward = mapping.findForward("suc");
}
return forward;
}