wood burning stoves 2.0*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes server DNS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "server DNS" Watch "server DNS" New topic
Author

server DNS

John Chien
Ranch Hand

Joined: Feb 06, 2003
Posts: 105
Hi,
The server DNS can be in the form of:
a) IP address
b) www.cnn.com form
If we want to allow user to enter the b) form,
we must have a system file that does the name/ip
translation.
Please let me know where I can find this file in the UNIX (/etc/host ??) and Window (???) operating system.
Thanks,
John Chien


SCJP, SCJD, SCWCD, SCBCD<br />IBM Certified Specialist (158)<br />Oracle9i PL/SQL Developer Certified Associate
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

well in windows it is in the windows directory.
Just do a find on host*.* and you will find your file.
However, I really wouldn't worry about it. If the ip or address that the client puts in is incorrect, then an Exception will be raised, and you just catch it and display a nice message that says "Sorry, but you have entered an invalid server. Please try again"
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
John Chien
Ranch Hand

Joined: Feb 06, 2003
Posts: 105
Mark:
That is a good strategy.
Thanks,
John Chien
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: server DNS