Hi, I am writing a JSP that is able to upload multiple files at a time (with a single File element). My idea is to create a table and add a row to it when a file is selected. And what I would like to do is to pass these values to an array and submit to the server. Here's what I've written so far.
I thought I could create an array with selected checkboxes and submit the array but I realize that I cannot return it to the JSP (or can I?). Can anyone suggest how to proceed further from here? I am open to an entirely different way of doing this if it is possible. The only constraint is I cannot limit the user to a max number of files and have to use a single file element.
Hi, I am writing a JSP that is able to upload multiple files at a time (with a single File element).
No, you're not. Because it won't work. Each file needs it's own file input in order for the server to actually get it. Do a search on google for multiple file uploads. You'll find loads of ways of doing this. Some using flash, some using the iframe trick. But it's not going to work the way you are attempting it right now.