This is an example demonstrating the use of MessageStoreInterceptor. When this form is submited a redirect is issue both when there's a validation error or not. Normally, when a redirect is issue the action messages / errors and field errors stored in the action will be lost (due to an action lives only as long as a request). With a MessageStoreInterceptor in place and configured, the action errors / messages / field errors will be store and remains retrieveable even after a redirect.

ActionMessages:
ActionErrors:

You must provide a name
You must provide your age

Try submitting with an invalid age value, and note that the browser location changes, but validation messages are retained. Because of the redirect, the input values are not retained.


Back To Validation Examples