Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Selecting Multiple Files For Upload

 
Luke Shannon
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi;

Using apache.commons.FileUploader I have a nice little ap that allows clients to upload a pic to the server.

My problem is my clients never upload just one. Its usually between 10-40.

Right now I use a simple html form to select the file and call my upload servlet:



I could add multiple input tags, building the form dynamically based on the number of pics a client want to upload, but this would get cluttered very fast.

I'm sure someone has solved this problem. Should I embed an applet in the JSP to do this? Anyone have any tips?

Thanks,

Luke

ps: I posted this question in this section because the webpage containing this feature is generated by a JSP page.

[ May 12, 2005: Message edited by: Luke Shannon ]
[ May 12, 2005: Message edited by: Luke Shannon ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65105
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I posted this question in this section because the webpage containing this feature is generated by a JSP page.


I'm going to move this to the HTML forum because the fact that a JSP was used to generate the page is moot. Once it gets to the browser, it's an HTML page like any other, and there is no JSP mechansim that is applicable to this issue.
 
Luke Shannon
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Makes sense. Thanks.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You basically are either going to have to use an applet or add multiple file upload fields. Problem with the file upload field is it contains strict security since an evil person could grab files that you would not want to be uploaded.

Eric
 
Luke Shannon
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks. An applet might be the way to go.

This one is free from SourceForge:

http://sourceforge.net/projects/jupload/

Seems to do what I need.

Luke
[ May 12, 2005: Message edited by: Luke Shannon ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic