File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes What is the difference between URL,URI And URN? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "What is the difference between URL,URI And URN?" Watch "What is the difference between URL,URI And URN?" New topic

What is the difference between URL,URI And URN?

sumanta panda
Ranch Hand

Joined: Jun 23, 2008
Posts: 224
What is the difference between URL,URI And URN?
Kindly give an real example for this thing.
[ June 25, 2008: Message edited by: sumanta panda ]
Marcus Green
arch rival

Joined: Sep 14, 1999
Posts: 2813
What is your current understanding of these terms?

SCWCD: Online Course, 50,000+ words and 200+ questions
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3381

Welcome to JavaRanch, sumanta panda

Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
sreeprasasd govindankutty

Joined: Jun 05, 2008
Posts: 5

A URI identifies a resource either by location, or a name, or both. More often than not, most of us use URIs that defines a location to a resource. The fact that a URI can identify a resources by both name and location has lead to a lot of the confusion in my opionion. A URI has two specializations known as URL and URN.


A URI identifies a resource by name in a given namespace but not define how the resource maybe obtained. This type of URI is called a URN. You may see URNs used in XML Schema documents to define a namespace, usually using a syntax such as:

<xsd:schema xmlns=""

Here the targetNamespace use a URN. It defines an identifier to the namespace, but it does not define a location.


A URL is a specialization of URI that defines the network location of a specific resource. Unlike a URN, the URL defines how the resource can be obtained. We use URLs every day in the form of, etc. But a URL doesn�t have to be an HTTP URL, it can be, smb://, etc.

Sreeprasad,<br />SCJP
Juwonlo Ibigbami
Ranch Hand

Joined: Nov 03, 2006
Posts: 83
Thanks, sreeprasasd, I thought I knew it but I got to know it more explicitly.
I agree. Here's the link:
subject: What is the difference between URL,URI And URN?
jQuery in Action, 3rd edition