Thanks KP Could you please elaborate on this..
What I understood is that have an ArrayList of FormFile in the form bean class... now query is how this arraylist will get populated ? If I need to create an ArrayList in JSP then how to get FormFile element? I am not aware of dynamic list control. Could you please provide code snippet of reference? Regards, Viral -----Original Message----- From: kamakshya_mishra(int) Sent: Thursday, July 08, 2004 12:01 PM To: Struts Users Mailing List Cc: Ketan_Bhat Subject: RE: Multiple File Upload using Struts (number of files dynamic) Hi, In the form bean keep an array list of FormFile and use it similarly as dynamic list control. KP -----Original Message----- From: Viral_Thakkar [mailto:[EMAIL PROTECTED] Sent: Thursday, July 08, 2004 3:01 PM To: Struts Users Mailing List Cc: Ketan_Bhat Subject: Multiple File Upload using Struts (number of files dynamic) Hi, We are trying to implement uploading file via struts framework using form bean. According to our requirement we have two scenarios' in which we require uploading of our file. 1) Uploading single file (single html:file control and a single upload button in jsp page) 2) Uploading multiple files (Multiple html:file controls on the screen on the same form). The problem is that these number of html:file controls on the screen is not fixed, it is dynamic. The user can click on an "Add More" button to increase dynamically the number of files he/she wants to upload. We have implemented the first scenario by using html:file tag on the JSP and keeping a form bean with html control as one of its member variables. In the action class we extract the value from the bean and then upload the file using I/O streams. Now, for the second scenario we need to upload an indeterminate (determined at run time) number of files but at the same time the number of members in the bean class cannot be changed dynamically. So we either need a way to add members to a form bean dynamically or some other mechanism which will handle this multiple upload requirement. With Regards, Viral --------------------------------------------------------------------- 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]