struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Gainty" <mgai...@hotmail.com>
Subject Re: [OT] Validating email addresses
Date Wed, 15 Jun 2005 13:52:53 GMT
Richard-
Can you run basic DNS nslookup utilities and or have access to
BIND a.root-servers.net - m.root-servers.net?
-OR-

You may want to use a combination of parsing the URL such as
http://java.sun.com/docs/books/tutorial/networking/urls/urlInfo.html

import java.net.*;
import java.io.*;

public class ParseURL {
    public static void main(String[] args) throws Exception {
        URL aURL = new URL("http://java.sun.com:80/docs/books/"
                           + "tutorial/index.html#DOWNLOADING");
        System.out.println("protocol = " + aURL.getProtocol());
        System.out.println("host = " + aURL.getHost());
        System.out.println("filename = " + aURL.getFile());
        System.out.println("port = " + aURL.getPort());
        System.out.println("ref = " + aURL.getRef());
    }
}

and then attempting to access the URL
http://java.sun.com/docs/books/tutorial/networking/urls/connecting.html
try {
    URL yahoo = new URL("http://www.yahoo.com/");
    URLConnection yahooConnection = yahoo.openConnection();

} catch (MalformedURLException e) {     // new URL() failed
    . . .
} catch (IOException e) {               // openConnection() failed
    . . .
}

Martin-
----- Original Message ----- 
From: "Richard Reyes" <richards.list@gmail.com>
To: "Struts Users Mailing List" <user@struts.apache.org>
Sent: Wednesday, June 15, 2005 6:02 AM
Subject: [OT] Validating email addresses


Hi Guys,

I plan to validate email addresses and Domain names entered by users
via those downloadable
javascripts. Any suggestions?

Also if I am to validate these fields do I need to know the valid .com
or .net domains?

Please advise
TIA!

Richard

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message