HttpSession session = request.getSession(); User user = (User) session.getAttribute("user"); if (user == null) { user = getUser(request); if (user != null) session.setAttribute("user", user); } return doExecute(mapping, form, request, response);
return request.getUserPrincipal() == null ? null : new User(request.getUserPrincipal().getName());