• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Multiple File Upload

 
santhi deeksha
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Thanks in advance for your help.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64721
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please take the time to choose the correct forum for your posts. This forum is for questions on JSP. For more information, please read this.

This post has been moved to a more appropriate forum.
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic