• Post Reply Bookmark Topic Watch Topic
  • New Topic

domain validation

 
amus manj
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a java api to validate domain name entries ?
getByName() does it to some extent, but not the right one to use though.
Eg: getByName() fails to identify sun.com as a valid domain name.
 
Joe Ess
Bartender
Posts: 9362
11
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please do not post the same question in multiple forums.
 
Van Glass
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To do this you would need to use Dns to validate the domain using a reverse dns lookup.

http://www.jscape.com/secureinetfactory/docs/javadoc/index.html

See the com.jscape.inet.dns.DnsRequest class for an example of how to get mail domain records for a domain name.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is of course no way to do it with zero network overhead. Look into InetAddress getByName, isReachable, etc. See if one of those gives the expected results on a good domain and a bogus one.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!