This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Sending multiple file from an applet to the server  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi people

I'm building a web based multiple file upload system for commercial use. The emphasis is on ease of use for the end user, who may have to upload many files in one go and so I've created an applet drag and drop based file chooser (so they can choose many files at once).

I've also finished writing the server side components (using the struts framework) for receiving and processing the multipart request from the browser.

The problem I'm having is how to send the files selected from the browser to the server as a multipart request.

I tested the server side bits using a standard html form with file inputs (Eg <input type="file" name="file1"> etc) and that works fine, but how do I get the applet to create that kind of request?

I think I probably need some kind of uploader class that turns a list of files into a multipart request that opens a connection to the server and sends it...but I'm not sure how - any code samples would be much appreciated...

Thanks for any help you can provide

Paul ;-)
 
Bartender
Posts: 9521
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Paul. Doing a search for "file upload" in this forum turns up over 30 articles, including this particularly helpful one.
 
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello;

I looking at a similar issue to Paul. In the article you reference the last line is:


All you'd need to do is add a file selection interface



This is what I'm looking for.

I have everything in place on the server to handle a list of file names. I just need an easy way of getting that list (other than a bunch of html input tags). I was hoping an applet would be it. Ideally I could have an applet that selects a group of files and than submits the data to my upLoad servlet.

How hard is this? Should I focus on something like this instead (something that selects the files and handles the upload)?

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

Thanks,

Luke
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!