Array of File object is empty/null in struts 2 action while uploading multiple files <p>I am trying to upload multiple files in struts 2 application but every time I am getting <code>File[] fileUpload</code> is empty . I have made several configuration changes in <code>struts.xml</code> but still getting <code>fileUplaod</code> object as either null or empty . Can someone tells me what am i supposed to do to get it working</p> <p>The corresponding action code is as : In this action I am retrieving the file object array and printing the details</p> <p>EDIT : </p> <p><strong><code>DummyFileUploadAction.java</code>:</strong></p> <pre><code>package com.cbuddy.common.action; import java.io.File; import com.opensymphony.xwork2.ActionSupport; public class DummyFileUploadAction extends ActionSupport{ private File[] fileUpload; private String fileUploadFileName; private String[] fileUploadContentType; public File[] getFileUpload() { return fileUpload; } public void setFileUpload(File[] fileUpload) { this.fileUpload = fileUpload; } public String getFileUploadFileName() { return fileUploadFileName; } public void setFileUploadFileName(String fileUploadFileName) { this.fileUploadFileName = fileUploadFileName; } public String[] getFileUploadContentType() { return fileUploadContentType; } public void setFileUploadContentType(String[] fileUploadContentType) { this.fileUploadContentType = fileUploadContentType; } @Override public void validate() { if (null == fileUpload) { System.out.println("DummyFileUploadAction.validate()"); } } public String uplaod(){ return "success"; } public String execute() throws Exception{ for (File file: fileUpload) { System.out.println("File :" + file); } for (String fileContentType: fileUploadContentType) { System.out.println("File type : " + fileContentType); } return SUCCESS; } } </code></pre> <p>The <code>struts.xml</code> is : I was able to get file object for single file upload with same set of configuration in <code>struts.xml</code></p> <p><strong><code>struts.xml</code>:</strong></p> <p> </p> <pre><code>&lt;struts&gt; &lt;constant name="struts.enable.DynamicMethodInvocation" value="false" /&gt; &lt;constant name="struts.devMode" value="true" /&gt; &lt;constant name="struts.custom.i18n.resources" value="ApplicationResources" /&gt; &lt;constant name="struts.multipart.maxSize" value="1000000" /&gt; &lt;package name="default" extends="struts-default,json-default" namespace="/"&gt; &lt;action name="upload" class="com.cbuddy.common.action.DummyFileUploadAction" method="uplaod"&gt; &lt;result name="success"&gt;/uplaod.jsp&lt;/result&gt; &lt;/action&gt; &lt;action name="dummyUpload" class="com.cbuddy.common.action.DummyFileUploadAction" &gt; &lt;interceptor-ref name="fileUpload"&gt; &lt;param name="allowedTypes"&gt;image/jpeg,image/gif,image/png&lt;/param&gt; &lt;/interceptor-ref&gt; &lt;interceptor-ref name="defaultStack"&gt;&lt;/interceptor-ref&gt; &lt;result name="success"&gt;/success.jsp&lt;/result&gt; &lt;result name="input"&gt;/uplaod.jsp&lt;/result&gt; &lt;/action&gt; &lt;/package&gt; &lt;/struts&gt; </code></pre> <p>And then <code>success.jsp</code> which will be rendered once files details are successfully printed .</p>