Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
5.2k views
in Java FTP by (320 points)
This is the scenario :

ftp = new FTPClient("ewii.elsevier.com");

"unknownhost exception is occuring"

i cant pass an ip address or hostname

this is a client's site and i have the username and password for this.

thanks

3 Answers

0 votes
by (162k points)
Can DNS resolve the hostname ewii.elsevier.com to an IP address? If not, you won't be able to FTP it. Ultimately, you have to have an IP address.

Try 'nslookup ewii.elsevier.com'

This is the scenario :

ftp = new FTPClient("ewii.elsevier.com");

"unknownhost exception is occuring"

i cant pass an ip address or hostname

this is a client's site and i have the username and password for this.

thanks
0 votes
by (320 points)
i can comprehend from this that when i give a hostname present in the local LAN my rogram runs fine but if i give a hostname like "yahoo.com" it gives me unknownhost exception.

my network managers say that i can connect only to a local lan host in this manner and not a host outside this lan.
0 votes
by (162k points)
If you can resolve an IP address and your firewall permits it, you should be able to ftp to the host - if an FTP server is listening on that IP address.

For example, you should have no trouble connecting to ftp.sun.com as an anonymous user.

However your network may be configured in such a way that you require a proxy to FTP outside it.

i can comprehend from this that when i give a hostname present in the local LAN my rogram runs fine but if i give a hostname like "yahoo.com" it gives me unknownhost exception.

my network managers say that i can connect only to a local lan host in this manner and not a host outside this lan.

Categories

...