jQuery in Action, 2nd edition*
The moose likes Servlets and the fly likes Need Help for implementing save as dialog box for downloading a folder not a file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Need Help for implementing save as dialog box for downloading a folder not a file" Watch "Need Help for implementing save as dialog box for downloading a folder not a file" New topic
Author

Need Help for implementing save as dialog box for downloading a folder not a file

Vinodh Sa
Ranch Hand

Joined: May 06, 2010
Posts: 55
Hi All,
Usually we download each and every file separetely. But my requirement is like, on click of a button the system should download multiple files and move them to a folder and that folder should get downloaded to the user specified path.

I need help in generating this save dialog box wit browse button where the user selects the path to save the folder. And i need that path to be binded wit a variable of my java class.

Currently the "HttpServletResponse" object is used for single file download (which will open a regular open,save,cancel dialog box like in all websites), but i m not able to retrieve the path that the user has selected for saving that particular file (from the "HttpServletResponse" object). If someone can help in getting the user selcted path, then i can bind that wit a string variable of my java class and i can download bulk files to the user specified folder.

Thanks, Vinodh
[Servlet tutorial]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60780
    
  65

There is no support in HTTP and HTML for folder download. You'll need to either get the requirement changed, or use a fatter client such as an Applet.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Vinodh Sa
Ranch Hand

Joined: May 06, 2010
Posts: 55
Bear Bibeault wrote:There is no support in HTTP and HTML for folder download. You'll need to either get the requirement changed, or use a fatter client such as an Applet.
Thanks Bibeault !!! Actually i have changed the requirement to Zip and download using java API's zip utility. Now its working.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need Help for implementing save as dialog box for downloading a folder not a file
 
Similar Threads
Downloading Files with applet
Save a pdf or any file to client machine from server
Downloading a file onclick of a node from Tree2
File Download Dialog
How to open a file dialog box (open, save as, new)