Class AbstractMappingDispatcher

java.lang.Object
org.apache.struts.dispatcher.AbstractDispatcher
org.apache.struts.dispatcher.AbstractMappingDispatcher
All Implemented Interfaces:
Serializable, Dispatcher
Direct Known Subclasses:
AbstractEventMappingDispatcher, ServletMappingDispatcher

public abstract class AbstractMappingDispatcher extends AbstractDispatcher
This abstract class is a template for choosing the target method that is named by the parameter attribute of the corresponding ActionMapping. The attribute value, if not provided, defaults to execute.
Since:
Struts 1.4
Version:
$Rev$
See Also:
  • Constructor Details

    • AbstractMappingDispatcher

      public AbstractMappingDispatcher(MethodResolver methodResolver)
      Constructs a new dispatcher with the specified method resolver.
      Parameters:
      methodResolver - the method resolver
  • Method Details

    • getDefaultMappingParameter

      protected final String getDefaultMappingParameter()
      Retrieves the default mapping parameter value. This value is used by resolveMethodName(ActionContext) if the mapping did not provide a value.
      Returns:
      the mapping parameter value or null
      See Also:
    • resolveMethodName

      protected String resolveMethodName(ActionContext context)
      Resolves the method name by obtaining the parameter attribute from the ActionMapping.
      Parameters:
      context - the current action context
      Returns:
      the parameter attribute value
      Throws:
      IllegalStateException - if the parameter cannot be resolved
    • setDefaultMappingParameter

      protected final void setDefaultMappingParameter(String defaultMappingParameter)
      Stores the new default mapping parameter value.
      Parameters:
      defaultMappingParameter - the parameter value
      See Also: