Can anyone suggest how I can go about validating URLs? It appears that the JDK only throws MalformedURLException if the URL contains an undefined protocol (scheme). I tried the Apache Commons-Validator API which seemed to do the same thing. I want to make sure the rest of the URL is valid as well.
Thanks for responding. Unfortunately (without going into the detail)this approach is not an option. I actually need to examine the URL and determine if it's format is legit without attempting to read from it. Otherwise this would be a good solution for me.