1 17 package org.apache.forrest.forrestbot.webapp.action; 18 19 import javax.servlet.http.HttpServletRequest ; 20 import javax.servlet.http.HttpServletResponse ; 21 22 import org.apache.forrest.forrestbot.webapp.Constants; 23 import org.apache.log4j.Logger; 24 import org.apache.struts.action.ActionForm; 25 import org.apache.struts.action.ActionForward; 26 import org.apache.struts.action.ActionMapping; 27 28 public final class LogoutAction extends BaseAction { 29 private static Logger log = Logger.getLogger(LogoutAction.class); 30 31 public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { 32 super.execute(mapping, form, request, response); 33 34 request.getSession(true).removeAttribute("auth"); 36 37 request.removeAttribute("auth"); 39 request.getSession(true).getServletContext().removeAttribute("auth"); 40 41 return mapping.findForward(Constants.FORWARD_NAME_SUCCESS); 42 } 43 } 44 | Popular Tags |