Package org.apache.struts2.interceptor
package org.apache.struts2.interceptor
Interceptor classes.
-
ClassDescriptionProvides default implementations of optional lifecycle methodsInterceptor that is based off of
MultiPartRequestWrapper
, which is automatically applied for any request that includes a file when the support for multi-part request is enabled, see Disabling file upload.The aim of this Interceptor is to alias a named parameter to a different named parameter.Interceptor that implements Cross-Origin Embedder Policy on incoming requests used to protect a document from loading any non-same-origin resources which don't explicitly grant the document permission to be loaded.A marking interface, when implemented allows to conditionally execute a given interceptor within the current action invocation.ConversionErrorInterceptor adds conversion errors from the ActionContext to the Action's field errors.Action can create cookies which will be stored in responseAllows actions to send cookies to client, action must implementCookieProvider
You must reference this interceptor in your default stack or in action's stack, see example below.Interceptor that implements Cross-Origin Opener Policy on incoming requests.A simple wrapper around an exception, providing an easy way to print out the stack trace of the exception as well as a way to get a handle on the exception itself.Interceptor that implements Fetch Metadata policy on incoming requests used to protect against CSRF, XSSI, and cross-origin information leaks.An interceptor that handles setting the locale specified in a session as the locale for the current action request.Uses to handle reading/storing Locale from/in different locationsThis listener is used byMessageStoreInterceptor
to store messages in HttpSession just before result will be executed.Utility class contains common methods used byMethodFilterInterceptor
.Watches forModelDriven
actions and adds the action's model on to the value stack.Refreshes the model instance on the value stack, if it has changedJust as the CheckboxInterceptor checks that if only the hidden field is present, so too does this interceptor.Interceptor that does nothing, used in the "empty" stackThis is a simple XWork interceptor that allows parameters (matching one of the paramNames attribute csv value) to be removed from the parameter map if they match a certain value (matching one of the paramValues attribute csv value), before they are set on the action.A utility class for invoking prefixed methods in action class.This interceptor callsprepare()
on actions which implementPreparable
.PreResultListeners may be registered with anActionInvocation
to get a callback after theAction
has been executed but before theResult
is executed.Proxy interface used together with PrincipalAware interface.Interface for the resource isolation policies to be used for fetch metadata checks.Adds the ability to set a model, probably retrieved from a given state.An interceptor that enables scoped model-driven actions.This interceptor populates the action with the static parameters defined in the action configuration.Default resource isolation policy used inFetchMetadataInterceptor
that implements theResourceIsolationPolicy
interface.ValidationAware classes can accept Action (class level) or field level error messages.ValidationErrorAware classes can be notified about validation errors beforeDefaultWorkflowInterceptor
will return 'inputResultName' result to allow change or not the result name This interface can be only applied to action which already implementsValidationAware
interface!ValidationWorkflowAware classes can programmatically change result name when errors occurred This interface can be only applied to action which already implementsValidationAware
interface!Interceptors marked with this interface won't be fully initialised during initialisation.