开发者

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

开发者 https://www.devze.com 2023-03-09 00:21 出处:网络
I am trying to get the list of files from FTPserver. My directory on 开发者_C百科server is \"upload\" directory, and i am trying to get the file name list from that directory using apache ftpclient li

I am trying to get the list of files from FTPserver. My directory on 开发者_C百科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.


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

After enabling passive mode i solved my problem.

0

精彩评论

暂无评论...
验证码 换一张
取 消