title: spring 3 upload many files
body: <p>yeah,our customer want to upload more than one file.
  we use spring 3 mvc.
  the official example like this:</p>
  
  <p>markup:</p>
  
  <pre><code>&lt;form method="post" action="/form" enctype="multipart/form-data"&gt;
      &lt;input type="text" name="name"/&gt;
      &lt;input type="file" name="file"/&gt;
      &lt;input type="submit"/&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>code:</p>
  
  <pre><code>@RequestMapping(value = "/form", method = RequestMethod.POST)
  public String handleFormUpload(@RequestParam("name") String name,
                                 @RequestParam("file") MultipartFile file) {
  
      if (!file.isEmpty()) {
          byte[] bytes = file.getBytes();
  
          // store the bytes somewhere
          return "redirect:uploadSuccess";
      } else {
          return "redirect:uploadFailure";
      }
  }
  </code></pre>
  
  <p>there is only one file,so i can write the file input name in the method.
  but what should i do if i want to upload many files.
  i could not write all the file input names because if is generated by the js code.
  i only know that its name like 'attach_'
  then ,what should i write in the method ? if i write like this</p>
  
  <pre><code>@RequestParam() MultipartFile file
  </code></pre>
  
  <p>or</p>
  
  <pre><code>@RequestParam("attach_") MultipartFile file
  </code></pre>
  
  <p>i'll get a error.</p>