문제

I want to connect to a FTP-Server via my Servlet and I know it works, but to use it on my virtual Server I need to change the Port the servlet connects to, because the FTP-Server doesn't use the standard port.

My problem is, that I don't know how I can tell the FTPClient not to use Port 21. For example it should use Port "55555".

The FTPClient only wants one parameter, the ip, to connect.

using org.apache.commons.net.ftp 
FTPClient ftp = new FTPClient();
ftp.connect("dyndns");

best SnowN

도움이 되었습니까?

해결책

you should use method connect(host,port)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top