Class RejectedFormValuesInterceptor

All Implemented Interfaces:
ConditionalInterceptor, Interceptor, Serializable, ConditionalInterceptor, Interceptor

public class RejectedFormValuesInterceptor extends MethodFilterInterceptor

Struts 2 Interceptor for setting conversion errors as overriding properties of the Value Stack, so rejected and failed form field values are displayed. This is the same as ConversionErrorInterceptor except it doesn't write error messages as AnnotationValidationInterceptor is expected to do this. In Interceptor stacks, it must be placed after interceptors to write or inject conversion errors, such as AnnotationValidationIntercetpor2 and FormRetrieveInterceptor, and after StaticParametersInterceptor as that wipes conversion errors.

Interceptor parameters:

disabled
If true, this interceptor is skipped.

Extending the interceptor:

This can't be usefully extended.

Example code:

 <action name="someAction" class="com.examples.SomeAction">
     <interceptor-ref name="staticParams"/>
     <interceptor-ref name="rejectedFormValues"/>
     <result name="success">good_result.ftl</result>
 </action>
 
 
See Also:
  • Constructor Details

    • RejectedFormValuesInterceptor

      public RejectedFormValuesInterceptor()
  • Method Details