Difference between URI and URL

hi,
i'm having trouble understanding the difference between a URI and URL.
The javadoc explains that
"A URI is a uniform resource identifier while a URL is a uniform
resource locator. Hence every URL is a URI, abstractly speaking, but not every URI is a URL. This is because there is another subcategory of URIs, uniform resource names (URNs), which name resources but do not specify how to locate them. The mailto, news, and isbn URIs shown above are examples of URNs.
The conceptual distinction between URIs and URLs is reflected in the differences between this class and the URL class.
in what way does a URL 'locate' a resource rather than name a resource?
eg.
URI example: mailto:[email protected]
URL example: http://java.sun.com/j2se/1.3/
I don't see why the email address does not 'locate' the particular email alias?
thanks,
asjf

Look at the class java.net.URL.
It has a number of methods, such as 'getContent', 'openConnection', 'openStream'. It is what differs URL from URI and answers your question about "I don't see why the email address does not 'locate' the particular email alias?".
With URL you can read the contents of the resource, pointed by URL, e.g. read a file from HTTP or FTP server. An URI does not imply that it refers to such a downloadable resource. It just names something, that somebody may know how to access.
Also consider the following examples:
- an URL of a document, if followed by a '#' symbol and by an anchor name ('fragment identifier') is sometimes referred as an URI, not URL, because it does locate a fragment in the file, not a downloadable file.
- a query ('?' followed by something, up to '#') is a part of the URL, because it is required to locate the file.
The syntax of an URI is described in RFC 2396, http://www.ietf.org/rfc/rfc2396.txt.

Similar Messages

  • Difference between urn and url

    what's the difference between urn and url?

    <b>What is an URL</b>
    An Uniform Resource Locator (URL) is the term used to identify an Internet resource, and can be specified in a single line of text.
    <b>What is an URN</b>
    An Uniform Resource Name (URN) is the term used to identify an Internet resource, without the use of a scheme, and can be specified in a single line of text.
    <b>What is an URI</b>
    An Uniform Resource Identifier (URI) is used by a browser to identify a single document, and it too can be specified in a single line of text
    <b>The general form of an URL has four parts</b>
    A scheme followed by a colon.
    Invokes a TCP/IP-based application level protocol
    Schemes are: http, https, ftp, news, mailto, file, telnet.
    <b>A server name.</b>
    A // followed by the host name or IP address of the server
    Not needed if the server is the default
    news server
    mail server
    <b>An optional port number. Standard or default port numbers are:</b>
    ftp *
    ssh 22
    telnet 23
    smtp 25
    gopher 70
    http 80
    nntp 119
    SSL 443
    <b>A path.</b>
    Consisting of folders and/or files.
    May include a file extension which identifies the type of document.
    May also include a QUERY_STRING with arguments.
    Ftp uses port 20 for data and port 21 for flow control.
    <b>DIFFERENCE BETWEEN URN & URI</b>
    The idea is that a URL is a mechanical link to a resource's location, where it can be downloaded. For this reason, a URL contains a hostname and a local part, all of which can be resolved anywhere on the Internet.
    What a URN tries to do is different. It tries to give a description of a resource without actually pointing at it. For example:
    urn:isbn:90-365-17273
    <b>URI:</b> is a string that identifies any resource. Indentifying the resource does not necessarily mean we can retrieve it. URI is a superset of URL and URN.
    files/reports/marketing/report.html
    <b>URL:</b> URI that specify a common Internet protocol such as HTTP or FTP are also called URLs. URL is an informal term an is not used in technical specifications.
    http://www.foo.com/files/reports/marketing/report.html
    <b>URN:</b> A URN is an identifier the uniquely indentifies a resource but does not specify how to access that resource.
    ISBN: 1-930110-59-6
    I hope it helps
    Best Regards

  • Difference between GET and URL Rewriting in Servlets

    What is the difference between GET and URL Rewriting in Servlets?.Please illustrate with an example.

    Thanks for your reply gimbal.
    GET appends query string at the end of the URL. URL rewriting also does the same thing. It also appends query string right?. Then what is the difference between two. I have this question in my mind for long time.To my surprise an interviewer asked this question in an interview also.

  • Difference between Web Service URL and Report Manager URL

    What is the difference between Web Service URL and Report Manager URL in Reporting Service configuration manager in SQl Server 2008 Reporting Setrvices

    Another way to put it is the Web Service URL is just that, its used for services that are connecting to issue API calls.  The Report Manager URL is the nice GUI that users should use.  If you click the links, you should see the difference.  I
    am sure you have likely done that, but functionally one is for programmatic purposes and the other to be the front end graphical user interface.
    Sometimes pictures help as well...
    http://bretstateham.com/reporting-services-architecture-diagram%E2%80%A6/

  • Difference between sendRedirect and RequestDispatcher?

    Difference between sendRedirect and RequestDispatcher?

    I have a situation of needing to redirect a request to a URL that is outside of the container. The scenario is the following, we have a simple logging in servlet that takes some POST parameters (username, password, and other values.) Depending on the username and password, the logon request along with all its POST parameters need to be redirected integrally to another machine. How do i do a redirect with all my parameters intact? sendRedirect does not seem to have any (visible to me) mechanism to do this. We cannot send them on the URL as this will reveal things too easily to our users and we don't want them to bookmark the resulting page.
    Thanks for any help,
    t

  • Difference between forward and redirect

    difference between forward and send redirect

    + a Redirect will change the URL in the browser, whereas a forward will not.
    + a Redirect can be any URL, whereas a forward has to be directed to a resource within the container,
    + a Redirect MUST be an absolute URL (though the Servlet functions will do this for you).
    + a Redirect, being a new request, triggers filters, whereas a forward does not.

  • Differences between Monitor and Decrypt actions in Decryption Policies

    Hi Everybody,
    Currently I'm working in my first WSA (S170) implementation and some questions has popped up while I was configuring the Decryption policies. The main question here is:
    What are the differences between "monitor" and "decrypt" in the URL Filtering options. As I understand the "decrypt" action allows the WSA to decrypt the packet and treats it like a plain HTTP packet applying the Access Policies, malware inspection and so on. Then I do not really know what the Monitor option does, I'm assuming that it does not decrypt the packet and only checks the destination URL and to allow or not the connection.
    Thanks in advance for your collaboration.
    Jose M. Cortes H.

    If you set it for Decrypt, it always decrypts stuff in that category.
    If you set it to monitor, then other criteria in the policy are used for whether to decrypt or not, such as Web Reputation...
    Here's the flow, which I pulled from the online help:
    https://wsaip:port/help/wsa_help/index.html?Decryption_policies11.html#wp1208329

  • Differences  between webservice and proxy

    Hi guys.
    Which are the differences between webservices and proxys?
    If I have a XI adapter (proxy) or Soap Adapter in Pi in both a Proxy Abap is created in SEECC to consume the service so I cant see the differences...
    Regards

    If I wanted to consume a webservice exposed in Pi by a Sender SOAP Sender, what would I have to do?
    Nothing exceptional.....just define a message structure in PI....create a message interface....generate a WSDL for this Message Interface.....use the URL from this WSDL to send message.....it is a normal SOAP --> XI scenario.....many references are readily available on How to do this.
    Regards,
    Abhishek.

  • Difference between concat and concatenation operator ||

    Hi,
    Most of us may think there is no difference between CONCAT and ||
    By looking in the doc, I can read
    This function is equivalent to the concatenation operator (||). The function is useful when there are spaces in the values to be concatenated. The concatenation operator does not permit spaces.
    <URL:SQL Reference>
    I cannot find a query with a difference, can you?
    SQL> select 'a '||' b',concat('a ',' b') from dual
    'A'||'B' CONCAT('A','B')
    a  b     a  bThanks for feedback
    Laurent

    Thanks APC, this is ok, I understand the platform independance of concat over || . It is also mission impossible to type || on some prehistoric/foreign keyboards/terminals.
    I will write in the docu feedback forum that
    CONCAT: The concatenation operator does not permit spaces.
    concatenation operator: Trailing blanks in character strings are preserved by concatenation
    are not clear, or even contradicting themselves.
    Best regards
    Laurent

  • What is the main difference between BPEL and ESB

    Hi all,
    I am making use ESB in my application .Where the my client application calls ESB and inturn the ESB calls the BPEL process .
    I want to know the differences between BPEL and ESB,I came to know that ESB can do messaging and routing ,where my BPEL process can also do the same thing .
    I came to know form a vendor that ESB is used for connecting to multiple end points ,where as my BPEL process can also do this.
    SO what is main purpose of using ESB ?
    Cheers,
    Kalyan.
    Message was edited by:
    patti

    Hi,
    Look for the blog entry dated 1st october 2007.
    URL:
    http://abhishek-soablog.blogspot.com
    Cheers,
    Abhi...

  • Could any one tell me what is the difference between swfloader and module loader?

    Hi  All,
                          Could any one tell me what is the difference between SWFLoader and Module Loader in Flex3 in detail?

    Hi,
    ModuleLoader is a kind of strange API that is really just intended to look like SwfLoader for modules that contain a single visual component, and hides most of the module loading infrastructure, which is all about class factories.
    What I mean by "only loaded once" is that if you have several places in the code that call the ModuleManager.getModule("url").load() call, it will only ever get loaded over the wire and interpreted once, subsequent "loads" will just re-dispatch pseudo-load events to the new client.  In other words, the class factory is a singleton for a given url. Unloading is a totally different story.  As you note, not everything is truly unloadable, because there may be lots of references to stuff in
    the module that will keep it alive and un-GC'ed.
    I suggest playing with the low-level API so that you understand the backing implementation, and this should help you understand the limits of ModuleLoader.
    The main difference between modules and applications is that modules have lower overhead, and they only ever get loaded once, no matter how many times you load them. If you're using the ModuleLoader API, keep in mind that you're losing about half the functionality of the module system.  I will assume that you are, because otherwise it would be obvious where to expose methods.  You might want to play around with the lower level ModuleManager API just to get a hang of what's going on - ModuleLoader is a pretty thin veneer over the lower API.                
                    Basically, what you want to do is to have your module implement an interface, say IModuleWhatever.
    Also try and refer to this link which was previously discussed in this forum..
    http://forums.adobe.com/message/74404
    Thanks,
    Bhasker

  • Difference between party and service

    Hi,
       I know  when we are going to  party and service (Normally party means. when we are doing Business to Business ) but what is exact difference  between party and service.. and if possible  definitions  also..
    Thanks
    Babu.

    Babu,
    Refer to url http://help.sap.com/saphelp_nw04/helpdata/en/87/1d6e3fefa13042e10000000a114084/frameset.htm
    An excerpt
    Services without a party are typically used when configuring company-internal processes. Parties (with assigned services) are typically used when configuring cross-company processes.
    Also refer to one of your previous forum questions and my response Re: Business System and Business Service Posted: Nov 28, 2007 4:31 PM in response to: BABU
    You usually use business system services when configuring internal company processes.
    You usually use business services when configuring cross-company processes. In this case, you only make your interfaces known to the business partners involved and either do not make any details about your own system landscape available, or only specific details.
    Hope this helps,
    Mike

  • What's the differences between rsp4 and rsp4+

    I want to know the differences between rsp4 and rsp4+

    According to the included URL, there is not a big deal of difference between the two devices. Here's a quote:
    The RSP4+ is an enhanced version of the RSP4 with larger default program memory (64 MB), Error Correction Code (ECC) memory protection, and compatibility with Cisco IOS® Software releases that support the current RSP4. This additional functionality is included with no increase in price, further enhancing the value of Cisco 7500 Series routers.
    http://www.cisco.com/en/US/partner/products/hw/routers/ps359/prod_bulletin09186a00800886e1.html
    Hope this helps,

  • How to tune the query and difference between CBO AND RBO.. Which is good

    Hello Friends,
    Here are some questions I have pls reply back with complete description and url if any ..
    1)How Did you tune Query,
    2)What approach you take to tune query? Do you use Hints?
    3)Where did you tune the query and what are the issue with query?
    4)What is difference between RBO and CBO? where u use RBO and CBO.
    5)Give some information about hash join?
    6) Using explain plan how do u know where the bottle neck in query .. how u will identify where the bottle neck is from explain plan .
    thanks/Kumar

    Hi,
    kumar73 wrote:
    Hello Friends,
    Here are some questions I have pls reply back with complete description and url if any ..
    1)How Did you tune Query, Use EXPLAIN PLAN to see exactly where it is spending its time, and address those areas.
    See the forum FAQ
    SQL and PL/SQL FAQ
    "3. How to improve the performance of my query?"
    2)What approach you take to tune query? Do you use Hints?Hints can help.
    Even more helpful is writing the SQL efficiently (avoiding multiple scans of the same table, filtering early, using built-in rather than user-defined functions, ...), creating and using indexes, and, for large tables, partitioning.
    Table design can have a big impact on performace.
    Look for ways to do part of what you need before the query. This includes denormalizing (when appropriate), the kind of pre-digesting that often takes place in data warehouses, function-based indexes, and, starting in Oracle 11, virtual columns.
    3)Where did you tune the query and what are the issue with query?Either this question is a vague summary of the entire thread, or I don't understand it. Can you re-phrase this part?
    4)What is difference between RBO and CBO? where u use RBO and CBO.Basically, use RBO if you have Oracle 7 or earlier.

  • Difference between SpSite and SpWeb

    hello ,
    I had an interview and I  was Asked thsi Question :
       What is the difference between  SpSite and SpWeb  ?
        and which one in the SiteCollection ?
      thanks

    The problem lies with the difference in terms used between the SharePoint user-interface and the object model. When we are speaking to end-users, they are familiar with the term "creating SharePoint team sites". However, everytime you create a "site" from the UI, an SPWeb object was created.
    It doesn't help that the MSDN documentation uses the following type of naming conventions in their code samples:
    SPSite mySiteCollection = new SPSite("http://servername/"); 
    SPWeb mySite = mySiteCollection.AllWebs["Site_Name"]; 
    SPWeb myRootSite = mySiteCollection.RootWeb;
    For me, it would have been much clearer if they wrote something like this instead:
    SPSite mySite = new SPSite("http://servername/"); 
    SPWeb myWeb = mySite.AllWebs["Site_Name"]; 
    SPWeb myRootWeb = mySite.RootWeb;
    While the description for SPSite may be valid, a typical SharePoint application web site only has onetop-level site collection. Therefore, in this url http://servername/site1/site1a/, there are actually three SPWeb objects, and only one SPSite object.
    SPSite site1 = new SPSite("http://servername/site1/");  
    SPSite site1a = new SPSite("http://servername/site1/site1a/");
    bool sitesAreEqual = site1.Equals(site1a);  // sitesAreEqual should evaluate to true.
    SPWeb web1 = site1.OpenWeb();
    SPWeb web1a = site1a.OpenWeb();
    SPWeb rootWeb = site1.RootWeb; // or site1a.RootWeb; would return same instance.
    See the SPSite.OpenWeb() method for more examples: http://msdn2.microsoft.com/en-us/library/ms474633.aspx.
    SPSite itself is not a "collection" in the sense that comes from CollectionBase, for example. In fact, both SPSite and SPWeb inherit directly from System.Object. Therefore, to use a name such as mySiteCollection is confusing/misleading.
    The key thing to keep in mind is that as developers, we need to use the technically accurate terms when speaking with each other (even if MSDN doesn't), and reserve the marketing/UI terms when speaking with people who would never see the object model. (Note: there are examples of these kinds of terminology differences all over the place in SharePoint 2007.)
    I hope this clears things up a bit...if you find something that is not correct/accurate, please let me know! some borns good, others make good

Maybe you are looking for

  • Why does the coversheet show in Acrobat Pro 9?

    This may have been answered before...I just haven't found it. Using Acrobat Pro 9 on XP... Why does the  'For the best experience..." coversheet show in documents that I have inserted pages to? I do everything with Acrobat Pro 9. it is frustrating to

  • Does not load a complete site

    When I go to Ancestry.com it does not download all of the site. I know its a firefox issue because I tried the site on Internet Exp and the site came up. I spent two hours on phone yesterday with Tech on Ancestry only to find it is a firefox problem.

  • F-32 new button "Cash Disc Due" in ECC6

    Hello all, Does anyone know what is the new button in F-32 "Cash Disc Due" in ECC6? any documentation will be helpful. thanks, Michal

  • How to remove a stripped screw from an iPhone 4?

    Since APPLE is so kind as to tell me "You broke your iPhone's home button, you can replace the phone for $200 I decided I'll just open it up and replace it myself!" I just recently went to replace my iPhone 4 screen/home button and find a stripped sc

  • How can I filter excel sheet?

    I need to know if there ant app for free helps me to filter & hide columns in excel sheet for m iPad ?