letsbedecent
asked on
File Uploading Using Struts.
Hello all,
I am developing an application using struts. I need to upload multiple files from web interface. For example, if user selects to upload two files, i have to upload both of them, does anyone have an abstract idea of its possibility, because even Yahoo and Gmail requires one to browse twice to upload 2 files., so if any suggestions out there... i would love to hear.
Thank You.
I am developing an application using struts. I need to upload multiple files from web interface. For example, if user selects to upload two files, i have to upload both of them, does anyone have an abstract idea of its possibility, because even Yahoo and Gmail requires one to browse twice to upload 2 files., so if any suggestions out there... i would love to hear.
Thank You.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I knew that there's one in the examples (struts-upload) but I didn't know whether it could handle multiple files in one go...
One file per FormFile object, but there should be no worries with a collection of them...
I don't think*
Tim
(* I have never tried this, and it may not work) ;-)
I don't think*
Tim
(* I have never tried this, and it may not work) ;-)
ASKER
Ok then i guess i have to try it.... and face problems :((
I had bad experience (while ago though) with struts indexed properties and FormFile so I used bloodredsun aproach and
handled the request using the jakarta library within the Action, which was very simple to do.
handled the request using the jakarta library within the Action, which was very simple to do.
ASKER
Can you provide a rough idea of how to achieve this !! I have no idea of how to achieve this.
I thought of using html:file tag at the front end, then using the property in the form i can upload the file....
but using jakarta library, what should be on the jsp and what should be on the form and what logic in the action handler !!??
thanks
I thought of using html:file tag at the front end, then using the property in the form i can upload the file....
but using jakarta library, what should be on the jsp and what should be on the form and what logic in the action handler !!??
thanks
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Struts has its own one ;-)
Just use a normal collection object, but use a collection of org.apache.struts.upload.F
Shouldn't be too hard...