How to upload more than one file in struts?
843836Jul 13 2004 — edited Feb 10 2005thanks first. I want to upload more than one file at once. So I modify the the example of the struts 1.1. I changed :
protected FormFile theFile;
to
protected FormFile [] theFile;
and add indexed getter and setter method.
public FormFile getTheFileIndexed(int index){
return theFile[index];
}
public void setTehFileIndexed(FormFile theFile,int index){
this.theFile[index]=theFile;
}
and in the upload.jsp, I changed
<html:file property="theFile" />
to
<html:file property="theFile[0]" />
and also in the ActionForm
reset(){
this.theFile=new FormFile[2];
....
}
But when I run it, it tells me there are no getter indexed method.
Thanks again for reading.