You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Vikash Manoranjan <vi...@infotechsw.com> on 2007/05/28 06:25:38 UTC
Multiple upload using Struts 1.0
Hi all,
We have very urgent requirement for multipe file upload option using Struts
1.0. The number of files to be uploaded will be decided at run-time. Kindly
help me. Its very urgent....
waiting for reply...
Thanks and Regards,
Vikash Manoranjan
Senior Software Engineer
Infotech Enterprises Limited
B-37, Sector-1,
Noida - 201301
Uttar Pradesh, India
Re: Multiple upload using Struts 1.0
Posted by Lance <la...@marketpipe.com>.
You should be right if you implement the 4 indexed bean methods on your
form.
@see
http://java.sun.com/j2se/1.4.2/docs/api/java/beans/IndexedPropertyDescriptor.html#IndexedPropertyDescriptor(java.lang.String,
java.lang.Class)
Here is an example if your property holding the files is called "files"
jsp:
<html:file property="files[0]" /> <!-- these may be build up in a for
loop or something -->
<html:file property="files[1]" /> <!-- these may be build up in a for
loop or something -->
<html:file property="files[2]" /> <!-- these may be build up in a for
loop or something -->
form:
public class MyMultiFileForm {
private List<FormFile> files = new ArrayList();
// provide implementations for the following methods
public List getFiles()
public List setFiles()
public FormFile getFiles(int index)
public void setFiles(int index, FormFile file)
}
Vikash Manoranjan wrote:
> Hi all,
>
> We have very urgent requirement for multipe file upload option using Struts
> 1.0. The number of files to be uploaded will be decided at run-time. Kindly
> help me. Its very urgent....
>
> waiting for reply...
>
>
> Thanks and Regards,
>
> Vikash Manoranjan
>
> Senior Software Engineer
>
> Infotech Enterprises Limited
> B-37, Sector-1,
> Noida - 201301
> Uttar Pradesh, India
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Multiple upload using Struts 1.0
Posted by Laurie Harper <la...@holoweb.net>.
Vikash Manoranjan wrote:
> Hi all,
>
> We have very urgent requirement for multipe file upload option using Struts
> 1.0. The number of files to be uploaded will be decided at run-time. Kindly
> help me. Its very urgent....
The question is rather broad. Perhaps this will give you the information
you need to get started and/or ask more specific questions:
http://wiki.apache.org/struts/StrutsFileUpload?highlight=%28upload%29
L.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org