title: html form fields as array elements in a struts form
body: <p>What I would like to do is add dynamically HTML input fields in one page, and each one of them correspond to an element of a struts array property. Let's say I have a number of identical fields in an HTML page:</p>
  
  <blockquote>
    <p>&lt; input type="file" name="myfile" /></p>
  </blockquote>
  
  <p>and when the form is submitted, I want each field to correspond to an element in a FormFile array in the struts form bean:</p>
  
  <blockquote>
    <p>FormFile [] myfile;</p>
  </blockquote>
  
  <p>Obviously the above doesn't work, but I am looking for how to do something equivalent.</p>
  
  <p>EDIT: <b> The above doesn't work for uploading files and the FormFile type only. </b></p>
  
  <p>Otherwise, an array element is mapped to an input element or html:text element instance, intuitively. So, to make my question more specific, why can't I upload with struts an array of files?</p>