Package name.matthewgreet.strutscommons.interceptor
package name.matthewgreet.strutscommons.interceptor
Various Struts 2 Interceptors.
The following configuration excerpt from struts.xml
is recommended.
<interceptor name="annotationValidation" class="name.matthewgreet.strutscommons.interceptor.AnnotationValidationInterceptor" /> <interceptor name="annotationValidation2" class="name.matthewgreet.strutscommons.interceptor.AnnotationValidationInterceptor2" /> <interceptor name="browserTab" class="name.matthewgreet.strutscommons.interceptor.BrowserTabInterceptor" /> <interceptor name="browserTab2" class="name.matthewgreet.strutscommons.interceptor.BrowserTabInterceptor2" /> <interceptor name="formFormatter" class="name.matthewgreet.strutscommons.interceptor.FormFormatterInterceptor" /> <interceptor name="formRetrieve" class="name.matthewgreet.strutscommons.interceptor.FormRetrieveInterceptor" /> <interceptor name="formStore" class="name.matthewgreet.strutscommons.interceptor.FormStoreInterceptor" /> <interceptor name="messageAmalgamation" class="name.matthewgreet.strutscommons.interceptor.MessageAmalgamationInterceptor" /> <interceptor name="messageRetrieve" class="name.matthewgreet.strutscommons.interceptor.MessageRetrieveInterceptor" /> <interceptor name="messageStore" class="name.matthewgreet.strutscommons.interceptor.MessageStoreInterceptor" > <interceptor name="rejectedFormValues" class="name.matthewgreet.strutscommons.interceptor.RejectedFormValuesInterceptor" /> <interceptor name="unhandledException" class="name.matthewgreet.strutscommons.interceptor.UnhandledExceptionWriterInterceptor" /> <interceptor-stack name="CommonStackTop"> <interceptor-ref name="browserTab" /> <interceptor-ref name="browserTab2" /> </interceptor-stack> <!-- This is the default stack minus the exception, params, conversionError, validation and workflow interceptor --> <interceptor-stack name="CommonStackBottom"> <interceptor-ref name="alias" /> <interceptor-ref name="servletConfig" /> <interceptor-ref name="i18n" /> <interceptor-ref name="prepare" /> <interceptor-ref name="chain" /> <interceptor-ref name="debugging" /> <interceptor-ref name="scopedModelDriven" /> <interceptor-ref name="modelDriven" /> <interceptor-ref name="fileUpload" /> <interceptor-ref name="checkbox" /> <interceptor-ref name="multiselect" /> <interceptor-ref name="staticParams" /> <interceptor-ref name="actionMappingParams" /> </interceptor-stack> <interceptor-stack name="StandaloneStack"> <interceptor-ref name="CommonStackTop" /> <interceptor-ref name="annotationValidation2"> <param name="excludeMethods">input,back,cancel,browse</param> </interceptor-ref> <interceptor-ref name="validation"> <param name="excludeMethods">input,back,cancel,browse</param> </interceptor-ref> <interceptor-ref name="workflow"> <param name="excludeMethods">input,back,cancel,browse</param> </interceptor-ref> <interceptor-ref name="CommonStackBottom" /> </interceptor-stack> <!-- Stack for actions that find or update data but not display it --> <interceptor-stack name="FormDrivenStack"> <interceptor-ref name="CommonStackTop" /> <interceptor-ref name="formStore" /> <interceptor-ref name="messageStore" /> <interceptor-ref name="unhandledException" /> <interceptor-ref name="CommonStackBottom" /> <interceptor-ref name="annotationValidation2"> <param name="excludeMethods">input,back,cancel,browse</param> </interceptor-ref> <interceptor-ref name="validation"> <param name="excludeMethods">input,back,cancel,browse</param> </interceptor-ref> <interceptor-ref name="workflow"> <param name="excludeMethods">input,back,cancel,browse</param> </interceptor-ref> </interceptor-stack> <!-- Stack for actions that display data --> <interceptor-stack name="ViewStack"> <interceptor-ref name="CommonStackTop" /> <interceptor-ref name="CommonStackBottom" /> <interceptor-ref name="annotationValidation2"> <param name="excludeMethods">input,back,cancel,browse</param> </interceptor-ref> <interceptor-ref name="formRetrieve" /> <interceptor-ref name="messageRetrieve" /> <interceptor-ref name="messageAmalgamation" /> <interceptor-ref name="formFormatter" /> <interceptor-ref name="rejectedFormValues" /> </interceptor-stack>
-
ClassDescriptionDeprecated.Only recognises form fields in formatted/unformatted pairs (pair conversion mode).Describes a form field annotation, its type, and an instance of a policy it configures, if applicable.Describes the result of a attempting to convert from a string to the generic type, and the field to receive it, successful or not.Struts 2 Interceptor for setting form fields from request parameters, adjusting, converting, validating, and writing error messages where data type conversion fails, according to form field annotations.If the action implements BrowserTabAware, sets tab id from cookies.If the action implements BrowserTabAware, sets tab id from cookies.Overrides ExceptionMappingInterceptor to always enable logging at ERROR level using the Action's class as the logging category.Struts 2 Interceptor used by view Actions for writing formatted versions of forms onto the Value Stack, so they're displayed instead of the unformatted form, using any conversion annotations on form fields.Retrieves a form stored in the session by
FormStoreInterceptor
and injects it into the action's member variable configured by theForm
annotation to accept it.If the action implementsFormDriven
, stores the form in the session so it may be retrieved by a later action that displays it.If the action implements ValidationAware, amalgametes all action errors and messages from other validation aware actions in the Value Stack.If the Struts action implementsValidationAware
, removes errors and messages stored in the session byMessageStoreInterceptor
and injects it into the action.If the action implementsValidationAware
, stores the errors and messages in the session so it may be retrieved by a later action that displays it.Struts 2 Interceptor for setting conversion errors as overriding properties of the Value Stack, so rejected and failed form field values are displayed.Detects an exception not handled by the form driven action, logs it, changes the result to 'input' or 'error' as needed and, if it implements ValidationAware, writes an action error for the user.