• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Multiple File Upload

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic