• Post Reply Bookmark Topic Watch Topic
  • New Topic

Download a file from Server to Client

 
Ketan Mohite
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,

I want to know one thing that whether, We can download and save a file from Server to client's machine without any prompt for Open/Save.

To be more clear, I have a link on a JSP page, clicking on which, a file (.url as an extension) should get downloaded to client's desktop and page should redirect to another page. Niether I want any open/save file alert while downloading a file nor I want that file to be opened.It should just get saved on Desktop of the client.

It seems to be strange requirement,but this is what my client wants.
I just want to confirm that, is this possible in Java or any other technologies?

Thanks & Regards,
Ketan
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65524
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is not possible. Imagine the security implications if it were.
 
Rusty Smythe
Ranch Hand
Posts: 93
Mac Objective C Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Slight correction:

It _is_ possible, iff (if and only if) the client has configured her browser to automatically download the file of mime type that you are sending.

If your users are in a closed environment (i.e., an internal corporate app), you can configure all the browsers to do this, but there is no way to guarantee that every user will have these settings on a non-homogeneous environment.

Maybe there is a different way to do what you are trying to accomplish. Why is it that you need to automatically download a file to the user's machine?
[ August 10, 2006: Message edited by: Rusty Smythe ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!