I use a PERL script to check and parse DNS records. It would be great to know how to do that directly with Java. Maybe some naming class or some method in the URL tools.
posted 14 years ago
You can use the DnsContextFactory to perform MX lookups. If you search for DnsContextFactory on java.sun.com you will find some pretty good examples. Start there. In the meantime here is a quick example of getting select records for an IP.
The NetworkInterface and InetAddress classes are usefull also. Look at the methods
Ok here is a quick and dirty validator. Gets the email string, validates it. If ok it returns the email if DNS lookup fails returns "<< email >>". Thus resetting the field. This is an AJAX call on the server so it isn't a real validator per see ala JSF or JSP style.
Have you no shame? Have you no decency? Have you no tiny ad?