Class CreateAction

All Implemented Interfaces:
org.apache.commons.chain.Command<ActionContext>, ActionCommand

public class CreateAction extends AbstractCreateAction

Concrete implementation of AbstractCreateAction for use in a Servlet API chain. Expects that the ActionContext passed into it can safely be cast to ServletActionContext.

  • Constructor Details

    • CreateAction

      public CreateAction()
  • Method Details

    • getAction

      protected Action getAction(ActionContext context, String type, ActionConfig actionConfig) throws Exception
      Description copied from class: AbstractCreateAction

      Create and return the appropriate Action class for the given type and actionConfig.

      NOTE: The dependence on ActionServlet suggests that this should be broken up along the lines of the other Abstract/concrete pairs in the org.apache.struts.chain.commands package.

      Specified by:
      getAction in class AbstractCreateAction
      Parameters:
      context - The Context for this request
      type - Name of class to instantiate
      actionConfig - The ActionConfig for this request
      Returns:
      Instantiated Action class
      Throws:
      Exception - if there are any problems instantiating the Action class.
    • createAction

      protected Action createAction(ActionContext context, String type) throws Exception

      Invoked by getAction when the Action actually has to be created. If the instance is already created and cached, this method will not be called.

      Parameters:
      context - The Context for this request
      type - Name of class to instantiate
      Returns:
      Instantiated Action class
      Throws:
      Exception - if there are any problems instantiating the Action class.
      Since:
      Struts 1.3.7