**功能三:用户退出功能**
1. 把用户信息从HttpSession中清除
/crm/WebContent/top.jsp
/crm/src/com/louis/web/action/UserAction.java
/**
* 登录功能
* @return
*/
public String login(){
User existUser = userService.login(user);
// 判断,登录名或者密码错误了
if(existUser == null){
return LOGIN;
}else{
ServletActionContext.getRequest().getSession().setAttribute("existUser", existUser);
// 登录成功
return "loginOK";
}
}
/crm/WebContent/top.jsp
/crm/src/com/louis/web/action/UserAction.java
/**
* 退出功能
* @return
*/
public String exit(){
ServletActionContext.getRequest().getSession().removeAttribute("existUser");
return LOGIN;
}