Class LogoutAction

java.lang.Object
org.apache.struts2.ActionSupport
org.conical.common.bbl.web.struts.actions.LogoutAction
All Implemented Interfaces:
Serializable, org.apache.struts2.action.Action, org.apache.struts2.action.ServletRequestAware, org.apache.struts2.action.ServletResponseAware, org.apache.struts2.interceptor.ValidationAware, org.apache.struts2.locale.LocaleProvider, org.apache.struts2.text.TextProvider, org.apache.struts2.Validateable

public class LogoutAction extends org.apache.struts2.ActionSupport implements org.apache.struts2.action.ServletRequestAware, org.apache.struts2.action.ServletResponseAware
Logs user out of the application by invalidating the entire session
Author:
rdoherty
See Also:
  • Field Summary

    Fields inherited from class org.apache.struts2.ActionSupport

    container

    Fields inherited from interface org.apache.struts2.action.Action

    ERROR, INPUT, LOGIN, NONE, SUCCESS
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Logs user out of the application by invalidating the entire session
    protected List<jakarta.servlet.http.Cookie>
    Returns additional cookies to send to user agent upon logout.
    void
    withServletRequest(jakarta.servlet.http.HttpServletRequest request)
     
    void
    withServletResponse(jakarta.servlet.http.HttpServletResponse response)
     

    Methods inherited from class org.apache.struts2.ActionSupport

    addActionError, addActionMessage, addFieldError, clearActionErrors, clearErrors, clearErrorsAndMessages, clearFieldErrors, clearMessages, clone, getActionErrors, getActionMessages, getContainer, getFieldErrors, getFormatted, getLocale, getLocaleProvider, getText, getText, getText, getText, getText, getText, getText, getText, getText, getTextProvider, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, hasKey, input, isValidLocale, isValidLocaleString, pause, setActionErrors, setActionMessages, setContainer, setFieldErrors, toLocale, validate

    Methods inherited from class Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LogoutAction

      public LogoutAction()
  • Method Details

    • execute

      public String execute() throws Exception
      Logs user out of the application by invalidating the entire session
      Specified by:
      execute in interface org.apache.struts2.action.Action
      Overrides:
      execute in class org.apache.struts2.ActionSupport
      Returns:
      success
      Throws:
      Exception
    • getAdditionalCookies

      protected List<jakarta.servlet.http.Cookie> getAdditionalCookies()
      Returns additional cookies to send to user agent upon logout. Default is to return an empty list; can be overridden to return a custom cookie list.
      Returns:
      list of custom cookies to return upon logout
    • withServletResponse

      public void withServletResponse(jakarta.servlet.http.HttpServletResponse response)
      Specified by:
      withServletResponse in interface org.apache.struts2.action.ServletResponseAware
    • withServletRequest

      public void withServletRequest(jakarta.servlet.http.HttpServletRequest request)
      Specified by:
      withServletRequest in interface org.apache.struts2.action.ServletRequestAware