The Zero
The Zero

Reputation: 1375

FTPClient.listnames() hangs when try to get list of files from server

I am trying to get the list of files from FTPserver. My directory on server is "upload" directory, and i am trying to get the file name list from that directory using apache ftpclient library.

I connect to server successfully and login also successful but when the line ...

FTPClientOBJ.listNames(); // for root directory i tried this and
FTPClientOBJ.listNames("/upload/"); // for upload directory which is in root directory

comes, at that time process hangs and after some time(3-4 min) i am getting exception that says Connection Closed without indication.

I am trying to do this in android.

Thanks.

Upvotes: 1

Views: 2524

Answers (1)

The Zero
The Zero

Reputation: 1375

I resolved the issuee .. I was not enabling the passive mode thats why problem was occuring.

After enabling passive mode i solved my problem.

Upvotes: 6

Related Questions