Class AbstractActionSupport

java.lang.Object
com.opensymphony.xwork2.ActionSupport
name.matthewgreet.strutscommons.action.AbstractActionSupport
All Implemented Interfaces:
com.opensymphony.xwork2.Action, com.opensymphony.xwork2.interceptor.ValidationAware, com.opensymphony.xwork2.LocaleProvider, com.opensymphony.xwork2.TextProvider, com.opensymphony.xwork2.Validateable, Serializable, BrowserTabAware, BrowserTabAware2, org.apache.struts2.action.ServletRequestAware
Direct Known Subclasses:
AbstractFormDrivenActionSupport, AbstractJsonServerAction, AbstractViewActionSupport

public abstract class AbstractActionSupport extends com.opensymphony.xwork2.ActionSupport implements BrowserTabAware, BrowserTabAware2, org.apache.struts2.action.ServletRequestAware

Base class of Struts 2 action that supports injection of user details and other custom integration.

Struts 2 docu suggests not using ServletRequestAware as it ties code to a servlet and impedes unit test. There is too much helper code that uses servlet request or session to rewrite and fake servlet requests can be inserted during a unit test anyway.

See Also:
  • Field Summary

    Fields inherited from class com.opensymphony.xwork2.ActionSupport

    container

    Fields inherited from interface com.opensymphony.xwork2.Action

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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns browser tab specific session.
    javax.servlet.http.HttpServletRequest
     
     
    void
    Sets browser tab specific session.
    void
     
    void
    withServletRequest(javax.servlet.http.HttpServletRequest request)
     

    Methods inherited from class com.opensymphony.xwork2.ActionSupport

    addActionError, addActionMessage, addFieldError, clearActionErrors, clearErrors, clearErrorsAndMessages, clearFieldErrors, clearMessages, clone, execute, 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, validate

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface name.matthewgreet.strutscommons.action.BrowserTabAware2

    copyAttributesFromOldTabToNewTab, handleAttributeFailures
  • Constructor Details

    • AbstractActionSupport

      public AbstractActionSupport()
  • Method Details