All 3 URI, URL, in addition to URN are used to position whatsoever resources or cite on the internet, but at that topographic point is a subtle departure betwixt them. URI is the superset of both URL in addition to URN. By the way, the master copy difference betwixt URL in addition to URI is protocol to retrieve the resource. URL ever include a network protocol e.g. HTTP, HTTPS, FTP etc to retrieve a resources from its location. While URI, inwards representative of URN only uniquely identifies the resources e.g. ISBN numbers which are a skillful representative of URN is used to position whatsoever mass uniquely. In this article, nosotros volition briefly run into what is URI, URL, in addition to URN in addition to hence run into the main departure betwixt URI, URL, in addition to URN.
What is URI
URI stands for Uniform Resource Identifier. URI is a text which is used to position whatsoever resources or cite on Internet. URI has ii specializations inwards the shape of URL (Uniform Resource Locator) in addition to URN (Uniform Resource Name) to position resources in addition to name. We generally run into examples of URL in addition to URN inwards the existent word. If y'all are working on JSP in addition to familiar alongside using tag library e.g. display tag in addition to JSTL gist tag library, hence y'all may think the move of URI to locate binary corresponding to a tag library.
What is URL
URL standards for Uniform resources locator in addition to it is a subset of URI or Uniform Resource Identifier. URL includes place every bit good every bit the protocol to retrieve the resources e.g. inwards /search?q=displaytag-examples-tutorial-jsp-struts, HTTP is a protocol which tin forcefulness out endure used to retrieve resources what-is-new-in-java-7-top-5-jdk-7.html available inwards place http://java67.blogspot.com directory. It's non necessary that URL ever include HTTP every bit protocol, it tin forcefulness out move whatsoever protocol e.g. ftp://, https:// or ldap://.
What is URN
URN stands for Uniform Resource Name. URN is likewise the subset of URI. One of the best examples of URN is ISBN number which is used to uniquely position a book. URN is completely unlike than URL every bit it doesn't include whatsoever protocol.
Difference betwixt URI, URL, in addition to URN
After knowing what is URI, URL, in addition to URN, it's slow to notice the departure betwixt them. The master copy departure betwixt URI in addition to URL is that every URL is a URI but non vice versa. Similarly, every URN is a URI, but the reverse is non true. Another departure betwixt URI in addition to URL is that URL includes the protocol, which is telephone substitution to retrieving information from whatsoever location. Here are few differences betwixt URI, URL in addition to URN inwards betoken format:
1) Every URL in addition to URN is URI because URI is the superset of both URL in addition to URN.
2) URL includes protocol e.g. http://, ftp:// along alongside place to position resources e.g. http://www.blogspot.com/abc.html.
3) URN are the unambiguous agency to position a resource. ISBN numbers are best examples of URN.
Here is a diagram which clearly reverberate the human relationship of URL, URI, in addition to URN on the internet:
Here is a diagram which clearly reverberate the human relationship of URL, URI, in addition to URN on the internet:
Further Learning
Data Structures in addition to Algorithms: Deep Dive Using Java
Difference betwixt ServletContext in addition to ServletConfig inwards JSP