|  1 |     | 
     | 
  |  2 |     | 
     | 
  |  3 |     | 
     | 
  |  4 |     | 
     | 
  |  5 |     | 
     | 
  |  6 |     | 
     | 
  |  7 |     | 
     | 
  |  8 |     | 
     | 
  |  9 |     | 
     | 
  |  10 |     | 
     | 
  |  11 |     | 
     | 
  |  12 |     | 
     | 
  |  13 |     | 
     | 
  |  14 |     | 
     | 
  |  15 |     | 
     | 
  |  16 |     | 
     | 
  |  17 |     | 
   package org.kuali.rice.kns.web.struts.action;  | 
  |  18 |     | 
     | 
  |  19 |     | 
   import org.apache.struts.action.Action;  | 
  |  20 |     | 
   import org.apache.struts.action.ActionForm;  | 
  |  21 |     | 
   import org.apache.struts.action.ActionForward;  | 
  |  22 |     | 
   import org.apache.struts.action.ActionMapping;  | 
  |  23 |     | 
   import org.kuali.rice.core.api.config.property.ConfigContext;  | 
  |  24 |     | 
   import org.kuali.rice.core.framework.services.CoreFrameworkServiceLocator;  | 
  |  25 |     | 
   import org.kuali.rice.kns.util.KNSConstants;  | 
  |  26 |     | 
     | 
  |  27 |     | 
   import javax.servlet.http.HttpServletRequest;  | 
  |  28 |     | 
   import javax.servlet.http.HttpServletResponse;  | 
  |  29 |     | 
     | 
  |  30 |     | 
     | 
  |  31 |     | 
     | 
  |  32 |     | 
     | 
  |  33 |     | 
     | 
  |  34 |     | 
     | 
  |  35 |     | 
     | 
  |  36 |     | 
     | 
  |  37 |    0 |    public class KualiLogoutAction extends Action { | 
  |  38 |     | 
     | 
  |  39 |     | 
         | 
  |  40 |     | 
     | 
  |  41 |     | 
     | 
  |  42 |     | 
     | 
  |  43 |     | 
       @Override  | 
  |  44 |     | 
       public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { | 
  |  45 |    0 |            String redirectString = null;  | 
  |  46 |     | 
             | 
  |  47 |     | 
             | 
  |  48 |     | 
             | 
  |  49 |     | 
           try { | 
  |  50 |    0 |                redirectString = CoreFrameworkServiceLocator.getParameterService().getParameterValueAsString(KNSConstants.KNS_NAMESPACE, KNSConstants.DetailTypes.ALL_DETAIL_TYPE, KNSConstants.LOGOFF_REDIRECT_URL_PARAMETER);  | 
  |  51 |     | 
           }  | 
  |  52 |    0 |            catch(IllegalArgumentException ex) { | 
  |  53 |    0 |                redirectString = ConfigContext.getCurrentContextConfig().getProperty(KNSConstants.LOGOFF_REDIRECT_URL_PROPERTY);  | 
  |  54 |    0 |            }  | 
  |  55 |     | 
             | 
  |  56 |    0 |            request.getSession().invalidate();  | 
  |  57 |     | 
             | 
  |  58 |    0 |            return new ActionForward(redirectString, true);  | 
  |  59 |     | 
       }  | 
  |  60 |     | 
     | 
  |  61 |     | 
   }  |