This discussion is archived
10 Replies Latest reply: Sep 10, 2007 6:13 AM by DarrylBurke RSS

Url validation

807605 Newbie
Currently Being Moderated
Hello everybody...

There seems to be a serious problem...
In the application I need to check out whether an user input a valid/invalid/unavailable URL.....

When an user inputs say,
It show the right result ... Valid URL

But when an user input say
It show the result ... Invalid URL.

It means it needs the http:// to be included with the www,

What should I do so that an user need not enter the whole of but just

The code which I used was:
                  new URL(url).openStream().close();
                  // good
             catch (MalformedURLException ex) 
                  // invalid
             catch (IOException ex) 
Please help me.