You could use a regular expression.
However, I think it would be better to try to construct a java.net.URL object from the String. If it its a valid URL, the construction will succeed. If it is badly-formed, the constructor will throw MalformedURLException.
That will be good enough to detect many common errors in your URL. However, you may wish to go further. If the java.net.URL object is successfully constructed, you can then check whether the protocol is appropriate for a Web site. You can check this with the getProtocol() method; the protocol should be "http". You could also check that a host has been given, by
testing whether the getHost() method returns a non-null, non-empty string.