Home » Struts-1.3.10 » org.apache.struts » actions »

org.apache.struts.actions

Interfaces:

DownloadAction.StreamInfo   The information on a file, or other stream, to be downloaded by the DownloadAction code | html

Abstract Classes:

BaseAction  

BaseAction is provided as an intermediate class for shared funtionality between Action and any stock implementation provided in this package.

 
code | html
DispatchAction  

An abstract Action that dispatches to a public method that is named by the request parameter whose name is specified by the parameter property of the corresponding ActionMapping. 

code | html
DownloadAction   This is an abstract base class that minimizes the amount of special coding that needs to be written to download a file.  code | html
LookupDispatchAction  

An abstract Action that dispatches to the subclass mapped execute method. 

code | html

Classes:

ActionDispatcher  

Action helper class that dispatches to a public method in an Action.

This class is provided as an alternative mechanism to using DispatchAction and its various flavours and means Dispatch behaviour can be easily implemented into any Action without having to inherit from a particular super Action.

To implement dispatch behaviour in an Action class, create your custom Action as follows, along with the methods you require (and optionally "cancelled" and "unspecified" methods):

  public class MyCustomAction extends Action {

      protected ActionDispatcher dispatcher
               = new ActionDispatcher(this, ActionDispatcher.MAPPING_FLAVOR);

      public ActionForward execute(ActionMapping mapping,
                                   ActionForm form,
                                   HttpServletRequest request,
                                   HttpServletResponse response)
                          throws Exception {
          return dispatcher.execute(mapping, form, request, response);
      }
  }

It provides three flavours of determing the name of the method:

  • #DEFAULT_FLAVOR - uses the parameter specified in the struts-config.xml to get the method name from the Request (equivalent to DispatchAction except uses "method" as a default if the parameter is not specified in the struts-config.xml).
  • #DISPATCH_FLAVOR - uses the parameter specified in the struts-config.xml to get the method name from the Request (equivalent to DispatchAction).
  • #MAPPING_FLAVOR - uses the parameter specified in the struts-config.xml as the method name (equivalent to MappingDispatchAction).
 
code | html
DownloadAction.FileStreamInfo   A concrete implementation of the StreamInfo interface which simplifies the downloading of a file from the disk.  code | html
DownloadAction.ResourceStreamInfo   A concrete implementation of the StreamInfo interface which simplifies the downloading of a web application resource.  code | html
EventActionDispatcher  

An Action helper class that dispatches to to one of the public methods that are named in the parameter attribute of the corresponding ActionMapping and matches a submission parameter. 

code | html
EventDispatchAction  

An Action that dispatches to to one of the public methods that are named in the parameter attribute of the corresponding ActionMapping and matches a submission parameter. 

code | html
ForwardAction  

An Action that forwards to the context-relative URI specified by the parameter property of our associated ActionMapping

code | html
IncludeAction  

An Action that includes the context-relative URI specified by the parameter property of our associated ActionMapping

code | html
LocaleAction   Implementation of Action that changes the user's java.util.Locale and forwards to a page, based on request level parameters that are set (language, country, & page).  code | html
MappingDispatchAction  

An abstract Action that dispatches to a public method that is named by the parameter attribute of the corresponding ActionMapping. 

code | html
RedeployableActionServlet  

WebLogic (at least v6 and v7) attempts to serialize the TilesRequestProcessor when re-deploying the Webapp in development mode. 

code | html
SwitchAction  

A standard Action that switches to a new module and then forwards control to a URI (specified in a number of possible ways) within the new module.

Valid request parameters for this Action are:

  • page - Module-relative URI (beginning with "/") to which control should be forwarded after switching.
  • prefix - The module prefix (beginning with "/") of the module to which control should be switched. 
code | html