Alias Interceptor alias |
Allows parameters in the request to be set on the action under a different name.
- aliasesKey (not required)-the name of the action parameter that contains the name-to-alias map (defaults to aliases).
<action name="test" class="com.examples.TestAction">
<param name="aliases">#{ 'action' : 'alias' }</param>
</action>
|
Chaining Interceptor chain |
Works with the chain result to copy data from one action to another.
- excludes (not required)-the list of parameter names to exclude from copying (all others will be included).
- includes (not required)-the list of parameter names to include when copying (all others will be excluded).
|
Checkbox Interceptor checkbox |
Looks for a hidden identification field that specifies the original value of the checkbox. Sets the value of checkbox elements that aren't submitted.
- setUncheckedValue (not required)-the value to set as the unchecked value (defaults to false)
|
Cookie Interceptor cookie |
Sets values in the Value Stack based on the cookie name and value-name and value must match for value to be set.
- cookiesName-comma separated list of cookie names to be injected into the Value Stack (all cookies can be specified with an asterisk).
- cookiesValue-comma separated list of cookie values to match (all cookies names can be specified by using an asterisk for the value)
|
Conversation Error Interceptor conversionError |
Sets the conversion errors from the ActionContext into the Action's field errors. |
Create Session Interceptor createSession |
Creates a HttpSession. |
Execute and Wait Interceptor execAndWait |
Starts a long-running action in the background on a separate thread, while preventing the HTTP request from timing out. While still in progress, a "wait" result is returned and rendered for the user (i.e. for an updating progress meter).
- threadPriority (not required)-the priority to assign the processing thread (default Thread.NORM_PRIORITY)
- delay (not required)-an initial delay before the wait page is displayed
- delaySleepInterval (not required)-how long to wait between wait page refreshing (only used with delay, default is 100 milliseconds)
|
Exception Interceptor exception |
Allows exception to be handled declaratively (via configuration).
- logEnabled (not required)-whether to log exceptions
- logLevel (not required)-the logging level to use (default is debug)
- logCategory (not required)-the logging category to use (default is com.opensymphony.xwork2.interceptor.Exception MappingInterceptor)
|
File Upload Interceptor fileUpload |
Allows the multi-part uploading of files. Three setters are required on the action for each property (the property being the name of the HTML form element)-{property}: the actual File, {property}ContentType: the files content type, and {property}FileName: the name of the file uploaded
- maximumSize (not required)-the maximum size in bytes for the file (default to ~2MB)
- allowedTypes (not required)-a comma separated list of allowed content types, i.e. text/html (defaults to allow all types)
|
Internationalization Interceptor i18n |
Allows the setting and switching of user locales.
- parameterName (not required)-the name of the HTTP request parameter that can switch the locale (default is request_locale)
- n attributeName (not required)-the name of the session key to store the selected locale (default is WW_TRANS_I18N_LOCALE)
|
Logger Interceptor logger |
Logs the start and end of the action's execution (logged at the INFO level). |
Message Store Interceptor store |
Stores the action's ValidationAware messages, errors and field errors into HTTP Session so they can be accessed after the current HTTP request.
- allowRequestParameterSwitch (not required)-enables the request parameter that can switch the operation mode of the interceptor
- requestParameterSwitch (not required)-the request parameter that will indicate what mode this interceptor is in.
- operationMode (not required) - the operation mode, 'STORE': stores messages; 'RETRIEVE': retrieves stored messages, or 'NONE': do nothing (defaults to 'NONE')
|
Model Driven Interceptor modelDriven |
Places the model (exposed via implementing the the Model- Driven interface on actions) from the action into the Value Stack above the action. |
Scoped Model Driven Interceptor scopedModelDriven |
Retrieves the model (specified by the ScopedModelDriven interface) before an action executes and stores the model after execution.
- className (not required)-the model class name (defaults to the model class name)
- name (not required)-the key to store the model under (defaults to the model class name).
- scope (not required)-the scope to store the model under (defaults to 'request' but can also be 'session')
|
Parameters Interceptor (a) params |
This interceptor sets all HTTP parameters onto the Value Stack. Actions that want to programmatically define acceptable parameters can implement ParameterNameAware interface.
- ordered (not required)-set to true if you want the topdown property setter behavior
|
Prepare Interceptor (a) prepare |
Calls a method for pre-execute logic for classes implementing the Preparable interface. The method called is either prepare{methodName}, where {methodName} is usually execute, or a generic prepare method.
- alwaysInvokePrepare (not required)-determines whether the prepare method will always be invoked (defaults to true)
|
Scope Interceptor scope |
Sets action properties from the HTTP session before an action is executed, and stores them back into the HTTP session after execution.
- session (not required)-a comma delimited list of properties to be stored in HTTP session scope
- application (not required)-a comma delimited list of properties to be stored in HTTP application scope
- key (not required)-the key to store the properties under, can be CLASS (generates a unique key based on the class name), ACTION (generates a unique key based on the action name), any supplied value
- type (not required)-"start": all properties are set to the actions default values; "end": all properties are removed once the action is run; anything else keeps default behavior
- sessionReset (not required)"when set to true all properties are reset
|
Servlet Configuration Interceptor servletConfig |
Allows the action to access HTTP information via interfaces. The interfaces that this interceptor supports are: ServletContextAware, ServletRequestAware, ServletResponseAware, ParameterAware, RequestAware, SessionAware, ApplicationAware and PrincipalAware. |
Static Parameters Interceptor staticParams |
Populates the action with the static parameters defined in the action configuration. If the action implements Parameterizable, a map of the static parameters will also be passed directly to the action. |
Roles Interceptor roles |
The action is invoked only if the user has the necessary role (supplied via the HttpServletRequest).
- allowedRoles-roles allowed to access the action
- disallowedRoles-roles not allowed to access the action
|
Timer Interceptor timer |
Logs the execution time of the request (in milliseconds).
- logLevel (not required)-the logging level to use (default is info)
- logCategory (not required)-the logging category to use (default is com.opensymphony.xwork2.interceptor TimerInterceptor)
|
Token Interceptor (a) token |
Ensures that only one request per token (supplied via the token tag) is processed,prevents double submitting of forms. |
Token Session Interceptor (a) tokenSession |
Builds off of the Token Interceptor, providing advanced logic for handling invalid tokens (providing intelligent fail-over in the event of multiple requests using the same session). |
Validation Interceptor (a) validation |
Runs the validations for the action. |
Workflow Interceptor (a) workflow |
Redirects user to an alternative result when validation errors are present (does not perform validation).
- inputResultName (not required)-the result to return when validation errors exist (defaults to input)
|
Parameter Filter Interceptor (not pre-configured) |
Blocks parameters from entering the Value Stack and being assigned to the action.
- allowed (not required)-a comma delimited list of parameter prefixes that are allowed
- blocked-a comma delimited list of parameter prefixes that are not allowed to pass
- defaultBlock-if true, all parameters are blocked and only those matching the allowed attribute will be allowed to pass (default to false)
|
Profiling Interceptor profiling |
Enables simple profiling (to the logger) when developer mode is enabled.
- profilingKey-the key to use to activate profiling
|
{{ parent.title || parent.header.title}}
{{ parent.tldr }}
{{ parent.linkDescription }}
{{ parent.urlSource.name }}