Actually, technically http://www.cmu.edu/hub is a _different_ url from http://www.cmu.edu/hub/
You don't see it because the HTTP request for the first is responded to by a redirect, which a browser then follows to the second url. java.net.URLConnection does follow redirects, but is fairly stupid about it, and doesn't allow you to get the final url, only the url that you gave it. You can write a wrapper around URLConnection, though, that will allow you to determine the _true_ url of the site that you are browsing.
|