Why do you want to upload multiple files? How would you determine which files to upload I want 1,2 and 4 next iteration I want 3 and 5? What happens in production environments (such as Tomcat) a concatenation of files is assembled EAR = WAR + RAR WebService AAR or JAR WAR = All jars and All classes and web.xml and struts-config.xml Uploading individual files such as I want to upload File1 from package1 but skip File2 from package2 makes no sense and give you no way to verify what you have With the end result is you may upload a disorganised mess of files to your server Have the client either EAR/WAR/JAR or TAR/ZIP your files and then upload At least the manifest will have be able to track what you have M- Information in this message, including attachments, is intended only for the confidential use of the recipient(s) named above. This message may be an Attorney-Client communication and as such is privileged and confidential. If you are not an intended recipient of this message, or an agent responsible for delivering it to an intended recipient , you are hereby notified that you have received this message in error, that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this message in error, please notify the sender immediately, delete the message, and return any hard copy print-outs. This e-mail communication and any attachments may contain confidential and privileged information for the use of the designated recipients named above. If you are not the intended recipient, you are hereby notified that you have received this communication in error and that any review, disclosure, dissemination, distribution or copying of it or its conte ----- Original Message ----- From: "Walter do Valle" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <user@struts.apache.org> Sent: Monday, October 16, 2006 3:50 PM Subject: Re: Why this does not work?
> Ok... ok... Thank you. > > But your example is very simple. Upload one single file is an easy job. > The problem is how to upload many files (undefined number of files) > using same name field in JSP page. > This works fine with simple fields like String, but not with FormFile. > > Martin Gainty escreveu: >> Walter- >> You need to identify an ActionForm and work up from there >> heres a link to get you started >> http://www.roseindia.net/struts/strutsfileupload.shtml >> >> your >> <html:form action="/FooAction" should point to your Action class >> >> later in struts-config.xml you need to associate FooAction with your custom >> form >> <action path = "/FooAction" type="Yourpackage.ConcatenarForm" >> >> where you have defined both the >> FooAction Class as well as the Forms class >> package.yourpackage.ConcatenarForm class >> >> Anyone else? >> Martin -- >> This e-mail communication and any attachments may contain confidential and >> privileged information for the use of the >> designated recipients named above. If you are not the intended recipient, >> you are hereby notified that you have received >> this communication in error and that any review, disclosure, dissemination, >> distribution or copying of it or its >> contents >> ----- Original Message ----- >> From: "Walter do Valle" <[EMAIL PROTECTED]> >> To: "Struts Users Mailing List" <user@struts.apache.org> >> Sent: Monday, October 16, 2006 3:01 PM >> Subject: Why this does not work? >> >> >> >>> In Struts 1.1 I used something like that to Upload multiple files >>> (undefined number of files). >>> Why does't this work anymore? >>> >>> public class ConcatenarForm extends ActionForm { >>> >>> private FormFile[] arquivo; >>> >>> public FormFile[] getArquivo() { >>> return arquivo; >>> } >>> >>> public void setArquivo(FormFile[] arquivo) { >>> this.arquivo = arquivo; >>> } >>> >>> } >>> >>> <html:form action="/concatenarArquivos" enctype="multipart/form-data" >>> method="POST" onsubmit="return validateConcatenarForm(this)"> >>> <html:file property="arquivo" size="50"/> >>> <html:file property="arquivo" size="50"/> >>> >>> </html:form> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >