title: Struts 2 redirect on validation failure and keep error message
body: <p>I'm trying to display a validation error message after a redirect of the input field of an action. I'm trying to use the MessageStoreInterceptor, but without much success.
  Here is the struts.xml:</p>
  
  <pre><code>        &lt;action name="list" class="myAction" method="list"&gt;
          &lt;interceptor-ref name="store"&gt;
              &lt;param name="operationMode"&gt;RETRIEVE&lt;/param&gt;
          &lt;/interceptor-ref&gt;
          &lt;interceptor-ref name="myDefaultInterceptorStack" /&gt;
          &lt;result name="success"&gt;/list.jsp&lt;/result&gt;
          &lt;result name="input"&gt;/list.jsp&lt;/result&gt;
      &lt;/action&gt;
      &lt;action name="add" class="myAction" method="add"&gt;
          &lt;interceptor-ref name="store"&gt;
              &lt;param name="operationMode"&gt;STORE&lt;/param&gt;
          &lt;/interceptor-ref&gt;
          &lt;interceptor-ref name="myDefaultInterceptorStack" /&gt;
          &lt;result name="success" type="redirectAction"&gt;
              &lt;param name="actionName"&gt;list&lt;/param&gt;
          &lt;/result&gt;
          &lt;result name="input" type="redirectAction"&gt;
              &lt;param name="actionName"&gt;list&lt;/param&gt;
          &lt;/result&gt;
      &lt;/action&gt;
  </code></pre>
  
  <p>The <em>list</em> method of the action sets the values of the dropdown in list.jsp, so it has to be executed before displaying the jsp.</p>
  
  <p>The validation is in MyAction-add-validation.xml:</p>
  
  <pre><code>    &lt;!DOCTYPE validators PUBLIC "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
         "http://struts.apache.org/dtds/xwork-validator-1.0.2.dtd"&gt;
  &lt;validators&gt;
      &lt;field name="name"&gt;
          &lt;field-validator type="requiredstring"&gt;
              &lt;message key="name.required" /&gt;
          &lt;/field-validator&gt;
      &lt;/field&gt;
  &lt;/validators&gt;
  </code></pre>
  
  <p>If I call list.action, list.jsp is displayed correctly populated. Then I submit the form calling add.action and since I left the name field emtpy, the validation fails.
  The MessageStoreInterceptor stores the field error, then the input redirect points to the list action, but the list action apparently forwards to the input forward without executing the list method first. </p>
  
  <p>So if I place the  tag in the list.jsp, I can see the error message from the validation, but the dropdown in list.jsp is not populated because the list method of list.action has not been executed.</p>
  
  <p>Is there any way to achieve what I need?
  Any helps is more than welcome.
  Thanks</p>