public org.apache.struts.action.ActionForward | execute(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
// --------------------------------------------------------- Public Methods
// See superclass for Javadoc
// Extract attributes we will need
HttpSession session = request.getSession();
User user = (User) session.getAttribute(Constants.USER_KEY);
// Process this user logoff
if (user != null) {
if (log.isDebugEnabled()) {
log.debug(
"LogoffAction: User '"
+ user.getUsername()
+ "' logged off in session "
+ session.getId());
}
} else {
if (log.isDebugEnabled()) {
log.debug(
"LogoffActon: User logged off in session " + session.getId());
}
}
session.removeAttribute(Constants.SUBSCRIPTION_KEY);
session.removeAttribute(Constants.USER_KEY);
session.invalidate();
// Forward control to the specified success URI
return (mapping.findForward("success"));
|