Class ActionMapping
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
RequestActionMapping
,SessionActionMapping
An ActionMapping represents the information that the
controller, RequestProcessor
, 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:
- $Rev$ $Date: 2005-08-26 21:58:39 -0400 (Fri, 26 Aug 2005) $
- See Also:
-
Field Summary
Fields inherited from class org.apache.struts.config.ActionConfig
acceptPage, actionId, attribute, cancellable, catalog, command, dispatcher, exceptions, extensionProcessed, forward, forwards, include, inherit, input, moduleConfig, multipartClass, name, parameter, path, populate, prefix, reset, roleNames, roles, scope, suffix, type, unknown, validate
Fields inherited from class org.apache.struts.config.BaseConfig
configured
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfindForward
(String forwardName) Find and return theForwardConfig
instance defining how forwarding to the specified logical name should be handled.String[]
Return the logical names of all locally defined forwards for this mapping.findRequiredForward
(String forwardName) Find and return theForwardConfig
instance of this mapping, throwing an exception if not found locally or globally.Create (if necessary) and return anActionForward
that corresponds to theinput
property of this Action.Methods inherited from class org.apache.struts.config.ActionConfig
addExceptionConfig, addForwardConfig, checkCircularInheritance, findException, findExceptionConfig, findExceptionConfigs, findForwardConfig, findForwardConfigs, freeze, getAcceptPage, getActionId, getAttribute, getCancellable, getCatalog, getCommand, getDispatcher, getExtends, getForward, getInclude, getInput, getModuleConfig, getMultipartClass, getName, getParameter, getPath, getPopulate, getPopulateNames, getPrefix, getReset, getResetNames, getRoleNames, getRoles, getScope, getSuffix, getType, getUnknown, getValidate, inheritExceptionHandlers, inheritForwards, inheritFrom, isExtensionProcessed, isSingleton, processExtends, removeExceptionConfig, removeForwardConfig, setAcceptPage, setActionId, setAttribute, setCancellable, setCatalog, setCommand, setDispatcher, setExtends, setForward, setInclude, setInput, setModuleConfig, setMultipartClass, setName, setParameter, setPath, setPopulate, setPrefix, setReset, setRoles, setScope, setSingleton, setSuffix, setType, setUnknown, setValidate, toString
Methods inherited from class org.apache.struts.config.BaseConfig
copyProperties, getProperties, getProperty, inheritProperties, setProperties, setProperty, throwIfConfigured
-
Constructor Details
-
ActionMapping
public ActionMapping()
-
-
Method Details
-
findForward
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, returnnull
.- Parameters:
forwardName
- Logical name of the forwarding instance to be returned- Returns:
- The local or global forward with the specified name.
- See Also:
-
findRequiredForward
Find and return the
ForwardConfig
instance of this mapping, throwing an exception if not found locally or globally.- Parameters:
forwardName
- Logical name of the forwarding instance to be returned- Returns:
- The local or global forward with the specified name.
- Throws:
IllegalStateException
- if the forward is not found- Since:
- Struts 1.4
- See Also:
-
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.
- Returns:
- The forward names for this action mapping.
-
getInputForward
Create (if necessary) and return an
ActionForward
that corresponds to theinput
property of this Action.Since Struts 1.4: If the
input
property is not specified and the Controller is configured to interpret the property as a forward, return the forward named "input" (if it exists) in this action mapping.- Returns:
- The input forward for this action mapping.
- Since:
- Struts 1.1
- See Also:
-