We are facing issues while using the following snippet with struts 1 and Tomcat 8 but in struts 1 with Tomcat 6 it's working fine.
ActionForm code:
public class FileUploadForm extends ActionForm
private FormFile file;
public void setFile(int index, FormFile file)
//putting the file in a map
}
public FormFile getFile() {
return file;
}
}
In struts config
<form-bean name="fileUploadForm" type="com.actionform.FileUploadForm"/>
<action path="/Upload"
type="org.springframework.web.struts.DelegatingActionProxy"
name="fileUploadForm"
scope="request"
validate="true"
input="/multiplefileupload.jsp">
<forward name="success"/>
JSP
<input type="file" name="file[0]"/>
<input type="file" name="file[1]"/>
I didn't get any exception when trying the code with Tomcat 8 and Struts1 but the ActionForm setter method setFile(int index, FormFile file) method is not getting called here. This happened when we try to migrate the struts 1 code in Tomcat 8. Thanks in Advance. Please let us know your suggessions on this.
Note: This code works fine in Tomcat 6 and Struts1.