标签:
public User getCurrcenUser(HttpServletRequest request) {
User user = null;
if(request != null){//huangqr add 2009.9.22
HttpSession session = request.getSession();
if (session != null) {// disposal to NullPointerException add by
// huangqr 2009.7.16
if (null != session.getAttribute("user")) {
user = (User) session.getAttribute("user");
}
}
}
return user;
}
标签:
原文地址:http://www.cnblogs.com/lelonta/p/5411735.html