title: Upload multiple files in Struts2 with Dropzone.js
body: <p>I am using DropZone.js</p>
  
  <p>My configuration is</p>
  
  <pre><code>Dropzone.options.myAwesomeDropzone = {
                          url: 'UploadImages',
                          previewsContainer: ".dropzone-previews",
                          uploadMultiple: true,
                          parallelUploads: 5,
                          maxFiles: 20,
                          addRemoveLinks: true,
                          init: function() {
                              this.on("success", function(file, response) {
                                  $('.dz-progress').hide();
                                  console.log(response);
                                  console.log(file);
                              });
                          }
                      }
                  });
  </code></pre>
  
  <p>This code is working perfectly with my local host.
  I am uploading files to <code>UploadImages</code> url.
  I have entered one message in that url method that is working properly.</p>
  
  <p>My problem is I am not getting which name should i use to get the content in server.
  Like what is name of imageFile variable, imageName variable, imageContent Type that should i access in my server side implementation.</p>
  
  <p><strong>Edit :</strong>
  Server side implementation of <a href="http://www.dropzonejs.com/" rel="nofollow">DropZone</a></p>
  
  <p>Dropzone does not provide the server side implementation of handling the files, but the way files are uploaded is identical to simple file upload forms like this:</p>
  
  <pre><code>&lt;form action="" method="post" enctype="multipart/form-data"&gt;
    &lt;input type="file" name="file" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I got it includes </p>
  
  <pre><code>&lt;input type="file" name="file" /&gt; 
  </code></pre>
  
  <p>automatically in form
  so we can access it using <code>file</code></p>
  
  <p>If </p>
  
  <pre><code>&lt;input name="file" type="file" multiple /&gt;
  </code></pre>
  
  <p>then we can access it using <code>file[]</code>
  in server side I tried</p>
  
  <pre><code>  public class ImageAction extends ActionSupport {
           private List&lt;File&gt; file;
           private List&lt;String&gt; fileContentType;
           private List&lt;String&gt; fileFileName;
  
           System.out.println("Inside Image upload ");
          System.out.print("\n\n---------------------------------------\n");
          int i = 0;
          for (File f : file) {
              System.out.print("\nFile [" + i + "] ");
              System.out.print(" length: " + f.length());
              System.out.print(" name:" + getFileFileName().get(i));
              System.out.print(" contentType: " + getFileContentType().get(i));
  
              i++;
          }
          System.out.println("\n---------------------------------------\n");
         }
         //getter setter  
         }
  </code></pre>
  
  <p>It is printing Inside Image upload.</p>
  
  <p>How to make access fields of file  on Action class.</p>