File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Prompt for location when file is downloading

 
haripriya vedula
Greenhorn
Posts: 24
  • 0
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A Swing app? Web app? TellTheDetails.
 
haripriya vedula
Greenhorn
Posts: 24
  • 0
  • 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
  • 0
  • 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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic