I work with different servers and configurations. What is the best java code approach for getting the scheme://host:[port if it is not port 80].
Here is some code I
URI u=new URI("http://www.google.com/"); String s=u.getScheme()+"://"+u.getHost()+":"+u.getPort();
As Cookie said, from java.net.URI (docs).