ActionMapping (Apache Struts API Documentation)
Keywords: org.apache.struts.action.ActionMapping,ActionMapping class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.struts.action
Class ActionMapping

    java.lang.Object
      |
      +--org.apache.struts.config.ActionConfig
            |
            +--org.apache.struts.action.ActionMapping

All Implemented Interfaces:
  java.io.Serializable

Direct Known Subclasses:
  RequestActionMapping, SessionActionMapping

public class ActionMapping
extends ActionConfig

An ActionMapping represents the information that the controller servlet, `ActionServlet`, knows about the mapping of a particular request to an instance of a particular action class. The ActionMapping instance used to select a particular Action is passed on to that Action, thereby providing access to any custom configuration information included with the ActionMapping object.

Since Struts 1.1 this class extends `ActionConfig`.

NOTE - This class would have been deprecated and replaced by `org.apache.struts.config.ActionConfig` except for the fact that it is part of the public API that existing applications are using.

Version:
  $Revision: 1.1 $ $Date: 2003-08-22 09:14:33 +0100 (Fri, 22 Aug 2003) $
Author:
  Craig R. McClanahan
See Also:
  Serialized Form

Field Summary

Fields inherited from class org.apache.struts.config.ActionConfig
`attribute, configured, exceptions, forward, forwards, include, input, moduleConfig, multipartClass, name, parameter, path, prefix, roleNames, roles, scope, suffix, type, unknown, validate`

Constructor Summary
`ActionMapping()`

Method Summary
`ExceptionConfig` | `findException(java.lang.Class type)` Find and return the `ExceptionConfig` instance defining how exceptions of the specified type should be handled.
`ActionForward` | `findForward(java.lang.String name)` Find and return the `ForwardConfig` instance defining how forwarding to the specified logical name should be handled.
`java.lang.String[]` | `findForwards()` Return the logical names of all locally defined forwards for this mapping.
`ActionForward` | `getInputForward()` Create (if necessary) and return an `ActionForward` that corresponds to the `input` property of this Action.

Methods inherited from class org.apache.struts.config.ActionConfig
`addExceptionConfig, addForwardConfig, findExceptionConfig, findExceptionConfigs, findForwardConfig, findForwardConfigs, freeze, getApplicationConfig, getAttribute, getForward, getInclude, getInput, getModuleConfig, getMultipartClass, getName, getParameter, getPath, getPrefix, getRoleNames, getRoles, getScope, getSuffix, getType, getUnknown, getValidate, removeExceptionConfig, removeForwardConfig, setApplicationConfig, setAttribute, setForward, setInclude, setInput, setModuleConfig, setMultipartClass, setName, setParameter, setPath, setPrefix, setRoles, setScope, setSuffix, setType, setUnknown, setValidate, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### ActionMapping

    public ActionMapping()

Method Detail

### findException

    public ExceptionConfig findException(java.lang.Class type)

  Find and return the `ExceptionConfig` instance defining how exceptions of the specified type should be handled. This is performed by checking local and then global configurations for the specified exception's class, and then looking up the superclass chain (again checking local and then global configurations). If no handler configuration can be found, return `null`.

  Parameters:
    `type` - Exception class for which to find a handler
  Since:
    Struts 1.1

### findForward

    public ActionForward findForward(java.lang.String name)

  Find and return the `ForwardConfig` instance defining how forwarding to the specified logical name should be handled. This is performed by checking local and then global configurations for the specified forwarding configuration. If no forwarding configuration can be found, return `null`.

  Parameters:
    `name` - Logical name of the forwarding instance to be returned

### findForwards

    public java.lang.String[] findForwards()

  Return the logical names of all locally defined forwards for this mapping. If there are no such forwards, a zero-length array is returned.

### getInputForward

    public ActionForward getInputForward()

  Create (if necessary) and return an `ActionForward` that corresponds to the `input` property of this Action.

  Since:
    Struts 1.1

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2003 - Apache Software Foundation