• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What's a correct way to select multiple files for download.

 
Vincent Oh
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a table with checkboxes which indicate which files to download.
If it's a single tick, the file will be downloaded directly, if multiple ticks, it will be zipped and sent by the server.

Problem: How should I send user's choice (files which are ticked) to the servlet? I was thinking of concating the fileIDs into a String and sent it over via GET.

Is there a better way to do this?

Thanks.
 
Jelle Klap
Bartender
Posts: 1951
7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you give all the checkbox input elements the same name, you can retrieve the values of the ones the user checked using the getParameterValues() method of ServletRequest.
 
Vincent Oh
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Icic. Thanks alot!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic