• Post Reply Bookmark Topic Watch Topic
  • New Topic

HTTP - FTP

 
roja potti
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,

I have an ftp web site which contains a folder consisting of sub folders and few files. I need to download this to the client local machine.I am using ftp clent to do this.

I wrote some code which opens a file dialog box and asks where to download the files.It works too.

Now my real problem came up.

All this code I deployed into a http web server. I created a jsp page which has a hyperlink. When I click the hyperlink a servlet is invoked which contains all my code. The dialog box opens up on the server but not on the client side.

how can I make this feasible.

Please help me.
 
Paul Clapham
Sheriff
Posts: 21892
36
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Throw away your dialog box. Just download the selected file and the browser will ask the user where to download it to.

Also: you can only download one file at a time through HTTP. So your requirement of downloading an entire folder is going to be very difficult to implement. You might want to reconsider the whole idea of doing this via HTTP.

Unless you want to replace your dialog box by a signed applet, that is. That might be a reasonable replacement.
[ September 20, 2007: Message edited by: Paul Clapham ]
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could zip the complete directory once the user clicks on the download link, and then stream the zip file to the browser.
 
roja potti
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thankyou so much for the replies. I don't want to use applets since it is a thick client and has security issues like signing it.

Inoroder to stream as a zip file to the browser do you have any code template. Please send it.

Thanks,
Roja.Potti
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!