wood burning stoves*
The moose likes Servlets and the fly likes download file from server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "download file from server" Watch "download file from server" New topic
Author

download file from server

R. Roy
Greenhorn

Joined: Apr 16, 2006
Posts: 7
I want to download the content of a specified directory(user-specific) present in the server to the client machine.
Here I dnt knw the content of the directory.I only knw the directory name(which differs from user to user).
Can nyone help me out with coded example?
Carl Trusiak
Sheriff

Joined: Jun 13, 2000
Posts: 3340
It all depends on the protocol you are using on the server, is it Samba, FTP HTTP, WebDAV?

Possibly the best way to do this is to use the VFS package from Jakarta Commons, changing the protocol you use for this is as simple as changing the URI you use for the directory path.

http://jakarta.apache.org/commons/vfs/


I Hope This Helps
Carl Trusiak, SCJP2, SCWCD
R. Roy
Greenhorn

Joined: Apr 16, 2006
Posts: 7
I m using HTTP protocol bt cant it be done java programming with thee FILE class object?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61224
    
  66

Not an advanced Java question.

Since you are using HTTP, I've moved this to the Servlets forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: download file from server