URL s never automatically armour their parameters, where URI s sometimes do.
If a bug report I got is correct, under some conditions Java version 1.6 URL.openConnection returns null without throwing an IOException.
The term URL can also be an as a verb, as in Please URL me that picture of the Windows Firewall, meaning Please email me the URL of that photograph, in other words email the text: http://mindprod.com/image/jgloss/msfirewall.jpg.
The new URL ( URL, String ) constructor lets you construct a new URL using the original as a context to modify. You do the equivalent thing with URI.resolve( String );
The URL constructor neither encodes nor decodes. It just leaves your blanks as either blanks or as %20, however you had them.
URLs always use UTF-8 encoding, no matter what the encoding of the enclosing document.
|HTTP (Hypertext Transfer Protocol) : URI Component Parts|
|roedy||getUserInfo||Userinfo, email address|
|http://www.mindprod.com||getProtocol() + ':' getHost()||home page|
|80||getPort||port, nearly always 80 for http. http://localhost:8080 accesses a local Tomcat server. http://localhost:4848 accesses a local Glassfish admin port.|
|/products/abc.html||getPath||path, URI : URI. This might be a file or it might be a directory. You can’t tell other than by the hint of a dot in the filename. It might be empty or just a single /.|
|/products||n/a||just the directory|
|abc.html||n/a||just the file|
|html||n/a||just the extension|
|type=all&colour=brown||getQuery||query, used in CGI (Common Gateway Interface) queries to pass data to the server.|
|/products/abc.html?type=all&colour=brown||getFile||path + query if any. It does not get you the file name!|
|FOXES||URL.getRef||ref, fragment, reference, target. Not technically part of the URI. Anchor in document to point to.|
|FOXES||URI.getFragment||URI equivalent of URL.getRef. part after #, ref, fragment, reference, target. Not technically part of the URI. Anchor in document to point to.|
CBC (Canadian Broadcasting Corporation) Radio asked its listeners to visit their website @cbc.ca/radio. At first I thought they had confused email and website addresses, meaning to say http://cbc.ca/radio however, when I typed it into various bowsers (Avant, Chrome, Firefox, Opera, Safari and Sea Monkey), it worked. It did not work in IE. It is a nice shortcut, chooping 7 letters down to 1. You can’t use it in URLs embedded in HTML.
If you leave the @ or http:// off entirely, it will work on the commmand line of all these browsers.
available on the web at:
optional Replicator mirror
Please email your feedback for publication, letters to the editor, errors, omissions, typos, formatting errors, ambiguities, unclear wording, broken/redirected link reports, suggestions to improve this page or comments to Roedy Green : . If you want your message, your name or email kept confidential, not considered for public posting, please explicitly specify that. Unless you state otherwise, I will treat your message as a letter to the editor that I may or may not publish in the feedback section. After that, it will be too late to retract it. If you disagree with something I said, especially when sending an ad-hominem attack, a rant composed mainly of obscenities or a death threat, please quote the offending passage and cite the web page where you found it, tell me why you think it is wrong, and, if possible, provide some supporting evidence. I can’t very well fix erroneous or ambiguous text if I can’t find it.
Your face IP:[126.96.36.199]
|Feedback||You are visitor number 25,746.|