1 16 package org.jmanage.webui.actions.auth; 17 18 import org.jmanage.webui.actions.BaseAction; 19 import org.jmanage.webui.util.WebContext; 20 import org.jmanage.webui.util.Forwards; 21 import org.jmanage.webui.util.Utils; 22 import org.jmanage.core.services.AuthService; 23 import org.jmanage.core.services.ServiceFactory; 24 import org.apache.struts.action.ActionForward; 25 import org.apache.struts.action.ActionMapping; 26 import org.apache.struts.action.ActionForm; 27 28 import javax.servlet.http.HttpServletRequest ; 29 import javax.servlet.http.HttpServletResponse ; 30 31 35 public class LogoutAction extends BaseAction{ 36 37 48 public ActionForward execute(WebContext context, 49 ActionMapping mapping, 50 ActionForm actionForm, 51 HttpServletRequest request, 52 HttpServletResponse response) 53 throws Exception { 54 AuthService authService = ServiceFactory.getAuthService(); 55 authService.logout(Utils.getServiceContext(context), context.getUser()); 56 context.removeUser(); 57 return mapping.findForward(Forwards.SUCCESS); 58 } 59 } 60 | Popular Tags |