Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Prompt for location when file is downloading

 
haripriya vedula
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A Swing app? Web app? TellTheDetails.
 
haripriya vedula
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Its a web application.

Thanks,
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic