Package | Description |
---|---|
org.apache.struts.action |
The action package is the core of the struts framework,
providing the "Controller" aspect of a MVC model.
|
org.apache.struts.chain.commands |
Configurable commands
that may be placed within the request processor.
|
org.apache.struts.chain.commands.servlet |
Commands which are particular to servlet processing.
|
org.apache.struts.chain.contexts |
This package provides objects that encapsulate access to
the request and session-scoped resources to service
command processing.
|
org.apache.struts.config |
The "config" package contains configuration objects that correspond to
elements that may be specified in the
struts-config.xml
module configuration file. |
org.apache.struts.config.impl |
Provides default implementation classes for the configuration objects.
|
org.apache.struts.util |
The Utilities package provides a variety of families of classes,
to solve problems that are commonly encountered in building web applications.
|
Modifier and Type | Class and Description |
---|---|
class |
ActionMapping
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. |
class |
RequestActionMapping
Subclass of
ActionMapping that defaults the form bean scope
to request . |
class |
SessionActionMapping
Subclass of
ActionMapping that defaults the form bean scope
to session . |
Modifier and Type | Method and Description |
---|---|
protected ActionConfig |
ActionServlet.processActionConfigClass(ActionConfig actionConfig,
ModuleConfig moduleConfig)
Checks if the current actionConfig is using the correct class based
on the class of its ancestor ActionConfig.
|
Modifier and Type | Method and Description |
---|---|
protected ActionConfig |
ActionServlet.processActionConfigClass(ActionConfig actionConfig,
ModuleConfig moduleConfig)
Checks if the current actionConfig is using the correct class based
on the class of its ancestor ActionConfig.
|
protected void |
ActionServlet.processActionConfigExtension(ActionConfig actionConfig,
ModuleConfig moduleConfig)
Extend the action's configuration as necessary.
|
protected ExceptionConfig |
ActionServlet.processExceptionConfigClass(ExceptionConfig exceptionConfig,
ModuleConfig moduleConfig,
ActionConfig actionConfig)
Checks if the current exceptionConfig is using the correct class
based on the class of its configuration ancestor.
|
protected void |
ActionServlet.processExceptionExtension(ExceptionConfig exceptionConfig,
ModuleConfig moduleConfig,
ActionConfig actionConfig)
Extend the exception's configuration as necessary.
|
protected ForwardConfig |
ActionServlet.processForwardConfigClass(ForwardConfig forwardConfig,
ModuleConfig moduleConfig,
ActionConfig actionConfig)
Checks if the current forwardConfig is using the correct class based
on the class of its configuration ancestor.
|
protected void |
ActionServlet.processForwardExtension(ForwardConfig forwardConfig,
ModuleConfig moduleConfig,
ActionConfig actionConfig)
Extend the forward's configuration as necessary.
|
Modifier and Type | Method and Description |
---|---|
protected abstract ForwardConfig |
AbstractExecuteAction.execute(ActionContext context,
Action action,
ActionConfig actionConfig,
ActionForm actionForm)
Execute the specified
Action , and return the resulting
ForwardConfig . |
protected abstract Action |
AbstractCreateAction.getAction(ActionContext context,
String type,
ActionConfig actionConfig)
Create and return the appropriate
Action class for the
given type and actionConfig . |
protected abstract String |
AbstractAuthorizeAction.getErrorMessage(ActionContext context,
ActionConfig actionConfig)
Retrieve error message from context.
|
protected abstract ForwardConfig |
AbstractExceptionHandler.handle(ActionContext context,
Exception exception,
ExceptionConfig exceptionConfig,
ActionConfig actionConfig,
ModuleConfig moduleConfig)
Perform the required handling of the specified exception.
|
protected void |
AbstractPopulateActionForm.handleCancel(ActionContext context,
ActionConfig actionConfig,
ActionForm actionForm)
Take into account whether the request includes any defined value for
the global "cancel" parameter.
|
protected boolean |
AbstractAuthorizeAction.isAuthorizationRequired(ActionConfig actionConfig)
Must authorization rules be consulted? The base implementation
returns
true if the given ActionConfig has
one or more roles defined. |
protected abstract boolean |
AbstractAuthorizeAction.isAuthorized(ActionContext context,
String[] roles,
ActionConfig actionConfig)
Determine if the action is authorized for the given roles.
|
protected abstract void |
AbstractPopulateActionForm.populate(ActionContext context,
ActionConfig actionConfig,
ActionForm actionForm)
Populate the given
ActionForm with request parameter
values, taking into account any prefix/suffix values configured on the
given ActionConfig . |
protected abstract void |
AbstractPopulateActionForm.reset(ActionContext context,
ActionConfig actionConfig,
ActionForm actionForm)
Call the
reset() method on the specified form
bean. |
protected String |
AbstractPopulateActionForm.trimParameterName(ActionConfig actionConfig,
String name)
For a given request parameter name, trim off any prefix and/or
suffix which are defined in
actionConfig and return what
remains. |
protected abstract ActionErrors |
AbstractValidateActionForm.validate(ActionContext context,
ActionConfig actionConfig,
ActionForm actionForm)
Call the
validate() method of the specified form bean,
and return the resulting ActionErrors object. |
Modifier and Type | Method and Description |
---|---|
protected ForwardConfig |
ExecuteAction.execute(ActionContext context,
Action action,
ActionConfig actionConfig,
ActionForm actionForm)
Execute the specified
Action , and return the resulting
ActionForward . |
protected Action |
CreateAction.getAction(ActionContext context,
String type,
ActionConfig actionConfig) |
protected String |
AuthorizeAction.getErrorMessage(ActionContext context,
ActionConfig actionConfig) |
protected ForwardConfig |
ExceptionHandler.handle(ActionContext context,
Exception exception,
ExceptionConfig exceptionConfig,
ActionConfig actionConfig,
ModuleConfig moduleConfig) |
protected boolean |
AuthorizeAction.isAuthorized(ActionContext context,
String[] roles,
ActionConfig mapping) |
protected void |
PopulateActionForm.populate(ActionContext context,
ActionConfig actionConfig,
ActionForm actionForm) |
protected void |
PopulateActionForm.reset(ActionContext context,
ActionConfig actionConfig,
ActionForm actionForm) |
protected ActionErrors |
ValidateActionForm.validate(ActionContext context,
ActionConfig actionConfig,
ActionForm actionForm)
Call the
validate() method of the specified form bean,
and return the resulting ActionErrors object. |
Modifier and Type | Method and Description |
---|---|
ActionConfig |
ActionContext.getActionConfig()
Get the ActionConfig which contains the details for processing this
request.
|
ActionConfig |
ActionContextBase.getActionConfig() |
Modifier and Type | Method and Description |
---|---|
void |
ActionContext.setActionConfig(ActionConfig config)
Set the ActionConfig class contains the details for processing this
request.
|
void |
ServletActionContext.setActionConfig(ActionConfig actionConfig) |
void |
ActionContextBase.setActionConfig(ActionConfig config) |
Modifier and Type | Method and Description |
---|---|
protected ActionConfig |
ActionConfigMatcher.convertActionConfig(String path,
ActionConfig orig,
Map vars)
Clones the ActionConfig and its children, replacing various
properties with the values of the wildcard-matched strings.
|
ActionConfig |
ModuleConfig.findActionConfig(String path)
Return the action configuration for the specified path, if any;
otherwise return
null . |
ActionConfig |
ModuleConfig.findActionConfigId(String actionId)
Returns the action configuration for the specifed action
action identifier.
|
ActionConfig[] |
ModuleConfig.findActionConfigs()
Return the action configurations for this module.
|
ActionConfig |
ActionConfigMatcher.match(String path)
Matches the path against the compiled wildcard patterns.
|
Modifier and Type | Method and Description |
---|---|
void |
ModuleConfig.addActionConfig(ActionConfig config)
Add a new
ActionConfig instance to the set associated
with this module. |
protected boolean |
ForwardConfig.checkCircularInheritance(ModuleConfig moduleConfig,
ActionConfig actionConfig)
Traces the hierarchy of this object to check if any of the ancestors
are extending this instance.
|
protected boolean |
ExceptionConfig.checkCircularInheritance(ModuleConfig moduleConfig,
ActionConfig actionConfig)
Traces the hierarchy of this object to check if any of the ancestors
are extending this instance.
|
protected ActionConfig |
ActionConfigMatcher.convertActionConfig(String path,
ActionConfig orig,
Map vars)
Clones the ActionConfig and its children, replacing various
properties with the values of the wildcard-matched strings.
|
protected void |
ActionConfig.inheritExceptionHandlers(ActionConfig baseConfig)
Compare the exception handlers of this action with that of the given
and copy those that are not present.
|
protected void |
ActionConfig.inheritForwards(ActionConfig baseConfig)
Compare the forwards of this action with that of the given and copy
those that are not present.
|
void |
ActionConfig.inheritFrom(ActionConfig config)
Inherit values that have not been overridden from the provided
config object.
|
void |
ForwardConfig.processExtends(ModuleConfig moduleConfig,
ActionConfig actionConfig)
Inherit configuration information from the ForwardConfig that this
instance is extending.
|
void |
ExceptionConfig.processExtends(ModuleConfig moduleConfig,
ActionConfig actionConfig)
Inherit configuration information from the ExceptionConfig that this
instance is extending.
|
void |
ModuleConfig.removeActionConfig(ActionConfig config)
Remove the specified action configuration instance.
|
Constructor and Description |
---|
ActionConfigMatcher(ActionConfig[] configs)
Finds and precompiles the wildcard patterns from the ActionConfig
"path" attributes.
|
Modifier and Type | Method and Description |
---|---|
ActionConfig |
ModuleConfigImpl.findActionConfig(String path)
Return the action configuration for the specified path, first
looking a direct match, then if none found, a wildcard pattern match;
otherwise return
null . |
ActionConfig |
ModuleConfigImpl.findActionConfigId(String actionId)
Returns the action configuration for the specifed action
action identifier.
|
ActionConfig[] |
ModuleConfigImpl.findActionConfigs()
Return the action configurations for this module.
|
Modifier and Type | Method and Description |
---|---|
void |
ModuleConfigImpl.addActionConfig(ActionConfig config)
Ad d a new
ActionConfig instance to the set
associated with this module. |
void |
ModuleConfigImpl.removeActionConfig(ActionConfig config)
Remove the specified action configuration instance.
|
Modifier and Type | Method and Description |
---|---|
static String |
RequestUtils.actionURL(javax.servlet.http.HttpServletRequest request,
ActionConfig action,
String pattern)
Return the context-relative URL that corresponds to the specified
ActionConfig , relative to the module associated with the
current modules's ModuleConfig . |
Copyright © 2000–2016 Apache Software Foundation. All rights reserved.