title: Why does the error "file.too.large" is not being showed (correctly) in the jsp?
body: <p>I have an application that let you upload some photos. I have a jsp page with a form to select what photo you want to upload:</p>
  
  <p><strong>subir-foto.jsp</strong></p>
  
  <pre><code>...
  &lt;s:form action="SubirFoto" method="post" enctype="multipart/form-data" theme="bootstrap"&gt;
     &lt;s:file name="foto" label="Foto" /&gt;
     &lt;s:submit value="Upload" align="center" /&gt;
  &lt;/s:form&gt;
  ...
  </code></pre>
  
  <p>I want that with this form, the user can only upload certain type of files (like jpg, gif ...) and don't let the user to upload photos with a size bigger than 2 MB.</p>
  
  <p><strong>struts.xml</strong></p>
  
  <pre><code>&lt;action
          name="SubirFoto"
          class="impl.redex.presentation.profile.upload.SubirFotosAction"&gt;
          &lt;interceptor-ref name="fileUpload"&gt;
              &lt;param name="maximumSize"&gt;2097152&lt;/param&gt;
              &lt;param name="allowedTypes"&gt;
                  image/png,image/gif,image/jpeg,image/pjpeg
              &lt;/param&gt;
          &lt;/interceptor-ref&gt;
          &lt;interceptor-ref name="dentroStack"&gt;&lt;/interceptor-ref&gt;
          &lt;result name="success"&gt;/WEB-INF/jsps/foto/foto-subida.jsp&lt;/result&gt;
          &lt;result name="input"&gt;/WEB-INF/jsps/foto/subir-foto.jsp&lt;/result&gt;
  &lt;/action&gt;
  </code></pre>
  
  <p>The file uploading works perfectly except one thing. I can upload any photo if it satisfies the requirements asked. If I try to upload a file that is not a photo (for example, a plain text file), the application puts me the error that I have defined in <code>global.properties</code> in the input of the form of the jsp.</p>
  
  <p><strong>global.properties</strong></p>
  
  <pre><code>struts.messages.error.uploading - No se ha podido subir el fichero
  struts.messages.error.file.too.large - El fichero es demasiado grande. El tamaño máximo es de 2MB.
  struts.messages.error.content.type.not.allowed - Tipo de fichero no aceptado. Sólo es válido si la foto \
  está en formato jpg/jpeg, gif o png.
  </code></pre>
  
  <p>The problem comes if I try to upload an image bigger than 2 MB, the application redirects me to <strong>subir-foto.jsp</strong> but it doesn't put any error in the jsp page.</p>
  
  <p>I have experimented a bit and if I put <code>&lt;s:actionerror /&gt;</code> in subir-foto.jsp an when I upload the big photo it appear this:</p>
  
  <pre><code>the request was rejected because its size (17224595) exceeds the configured maximum (2097152)
  </code></pre>
  
  <p>As you can see, this is not the error that I have defined in <code>global.properties</code>.</p>
  
  <p>Why are not this two different errors field errors? Is this a problem with bootstrap plugin? Or is it a bug of Struts2? Am I doing something wrong? Any help with be appreciated, thanks.</p>