URI and URL

Source: Internet
Author: User

Recently saw a lot about the URI and URL of the content, at first only know the URL, but also thought it was a mistake in the blog, today just saw an introduction to the two concepts of the blog, recorded.

Gradually understand that these two concepts will be used in JavaBean, such as: Imgurl,logouri.

There are essentially three concepts: Uri/rul/run

The URI, which is the Uniform Resource identifier, is the Uniform Resource identifier used to uniquely identify a resource.

URL, the Uniform Resource Locator, a unified resource Locator, is a specific URI that the URL can use to identify a resource, and also how to locate the resource.

Urn,uniform resource Name, unified resource naming, identifies resources by name, such as Mailto:[email protected].

In general, URIs define uniform resource identities in an abstract, high-level concept, whereas URLs and urns are specific resource identities. URLs and urns are all a kind of URI.

In Java, a URI instance can represent an absolute or relative, as long as it conforms to the syntax rules of the URI . The URL class not only conforms to semantics, but also contains information that locates the resource , so the URL cannot be relative and the schema must be specified.

Resources:

Http://www.cnblogs.com/gaojing/archive/2012/02/04/2413626.html

Http://docs.oracle.com/javase/1.5.0/docs/api/java/net/URI.html

Http://en.wikipedia.org/wiki/Uniform_Resource_Identifier

Http://docs.oracle.com/javaee/5/api/javax/servlet/http/HttpServletRequest.html

URI and URL

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.