title: struts2 file upload loosing parameters
body: <p>Using Struts 2.3.15.1</p>
  
  <p>Implementing file upload in struts2. This is something I've done a number of times, however, I'm trying to include some sanity checks (i.e. max file size primarily). I have the <strong>fileUpload</strong> interceptor in place as the last interceptor in my stack (i.e. <strong>struts.xml</strong>). My stack includes a few in-house interceptors as well as the <strong>validationWorkflowStack</strong>. I've set the following property in my <strong>struts.properties</strong> file:</p>
  
  <pre><code>struts.multipart.maxSize = 2000000
  </code></pre>
  
  <p>In addition to the file upload, I'm passing a few other params in my form. Form is defined as:</p>
  
  <pre><code>&lt;s:form action="addResource" method="post" enctype="multipart/form-data"&gt; 
    &lt;s:hidden name="rfqId" value='%{rfq.id}' /&gt;
    &lt;s:file name="uploadFile" id="uploadFile" label="File" size="40" value=""/&gt;
    ....
  &lt;/s:form&gt;
  </code></pre>
  
  <p>As I'm sure we all know, the <strong>validationWorkflowStack</strong> includes the <strong>params</strong> interceptor, which sets the request params onto the action. Here's the issue, when the file being uploaded exceeds the <strong>maxSize</strong>, there are no params for the <strong>params</strong> interceptor to set. I've stepped through is and there's nothing in the actionContext. This is not good, because I need those params to handle the INPUT error that will result.</p>
  
  <p>Am I missing something? </p>