jQuery in Action, 2nd edition*
The moose likes Servlets and the fly likes Prompt for location when file is downloading Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Prompt for location when file is downloading" Watch "Prompt for location when file is downloading" New topic
Author

Prompt for location when file is downloading

haripriya vedula
Greenhorn

Joined: May 31, 2008
Posts: 24
Hi all,

I need a sample code for downloading a file from client location(from another server).

while downloading it should prompt for location where to downlaod.

Any help is appreciable.

Thanks,
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

A Swing app? Web app? TellTheDetails.
haripriya vedula
Greenhorn

Joined: May 31, 2008
Posts: 24
Hi,

Its a web application.

Thanks,
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Moving to servlets (for now).

If you search the web for "download servlet" you'll get a lot of hits. Whether or not the user is prompted to save the file can be browser- and configuration-specific, which is why you'll see a lot of expository text like "right-click and select 'save as'" and so on, but if you set the content disposition as an attachment, you'll be doing about the most you can.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Prompt for location when file is downloading
 
Similar Threads
copying file remotely
Fileuploads worddocument and xls
Setting up a file Download from my site
regarding file downloading
streamType + download file with direct byte Array without converting it to File object