title: Referencing actionerror from httpheader result in struts.xml
body: <p>In my TestClass action I am setting an action error using addActionError method. I have an action defined in the struts.xml as following</p>
  
  <pre><code>&lt;action name="TestAction" class="TestClass"&gt;
      &lt;result name="input"&gt;/jsp/test.jsp&lt;/result&gt;
      &lt;result name="error" type="httpheader"&gt;
         &lt;param name="error"&gt;409&lt;/param&gt;
         &lt;param name="errorMessage"&gt;${SOME-EXPRESSION}&lt;/param&gt;
      &lt;/result&gt; 
  &lt;/action&gt;
  </code></pre>
  
  <p>The intent is to have the error message display whatever was added using addActionError. According to the org.apache.struts2.dispatcher.HttpHeaderResult documentation, I should be able to use Ognl expressions within errorMessage parameter.</p>
  
  <p>So, is it possible to put something in place of ${SOME-EXPRESSION} that will reference actionerror in this scenario.(I tried ${actionerror} but it didn't work)</p>
  
  <p>I know that I can have a workaround by declaring my own field (for example "errorText") in the action class and using that insteda of addActionError referencing it using ${errorText} inside the param tags. But before I go that route, want to make sure that's the only way.</p>