aspose file tools*
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
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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Prompt for location when file is downloading