public class ActionMappingParametersInterceptor extends ParametersInterceptor
This interceptor sets all parameters from the action mapping, for this request, on the value stack. It operates
exactly like ParametersInterceptor, only the parameters come from the ActionMapping, not the
ActionContext.getParameters() method.
Interceptor parameters:
Extending the interceptor:
The best way to add behavior to this interceptor is to utilize the ParameterNameAware interface in your
actions. However, if you wish to apply a global rule that isn't implemented in your action, then you could extend
this interceptor and override the ParametersInterceptor.acceptableName(String) method.
Example code:
<action name="someAction" class="com.examples.SomeAction">
<interceptor-ref name="mappingParams"/>
<result name="success">good_result.ftl</result>
</action>
ordered, PARAM_NAME_MAX_LENGTHexcludeMethods, includeMethods| Constructor and Description |
|---|
ActionMappingParametersInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addParametersToContext(ActionContext ac,
Map<String,?> newParams)
Adds the parameters into context's ParameterMap
|
protected HttpParameters |
retrieveParameters(ActionContext ac)
Gets the parameter map to apply from wherever appropriate
|
acceptableName, doIntercept, getOrderedComparator, getParameterLogMap, isAcceptableParameter, isAccepted, isExcluded, isOrdered, isWithinLengthLimit, notifyDeveloperParameterException, setAcceptedPatterns, setAcceptParamNames, setDevMode, setExcludedPatterns, setExcludeParams, setOrdered, setParameters, setParamNameMaxLength, setValueStackFactoryapplyInterceptor, getExcludeMethodsSet, getIncludeMethodsSet, intercept, setExcludeMethods, setIncludeMethodsdestroy, initprotected HttpParameters retrieveParameters(ActionContext ac)
ParametersInterceptorretrieveParameters in class ParametersInterceptorac - The action contextprotected void addParametersToContext(ActionContext ac, Map<String,?> newParams)
addParametersToContext in class ParametersInterceptorac - The action contextnewParams - The parameter map to apply
In this class this is a no-op, since the parameters were fetched from the same location. In subclasses both retrieveParameters() and addParametersToContext() should be overridden.
Copyright © 2000–2018 Apache Software Foundation. All rights reserved.