1 package com.dotmarketing.cms.login.action; 2 3 4 import javax.servlet.http.HttpServletRequest ; 5 import javax.servlet.http.HttpServletResponse ; 6 7 import org.apache.struts.Globals; 8 import org.apache.struts.action.ActionForm; 9 import org.apache.struts.action.ActionForward; 10 import org.apache.struts.action.ActionMapping; 11 import org.apache.struts.action.ActionMessage; 12 import org.apache.struts.action.ActionMessages; 13 import org.apache.struts.actions.DispatchAction; 14 15 import com.dotmarketing.cms.login.factories.LoginFactory; 16 17 18 25 26 27 public class LogoutAction extends DispatchAction { 28 public ActionForward unspecified(ActionMapping mapping, ActionForm lf, HttpServletRequest request, 29 HttpServletResponse response) throws Exception { 30 31 LoginFactory.doLogout(request, response); 32 33 34 ActionMessages am = new ActionMessages(); 35 am.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("message.Logout.Successful")); 36 request.getSession().setAttribute(Globals.MESSAGE_KEY, am); 37 38 ActionForward af = mapping.findForward("afterLogoutPage"); 39 return af; 40 } 41 } 42 | Popular Tags |