Uniform Resource Locators

Classic programmed-learning exercises, refreshed for modern Java and presented in the current MrStyner.com portfolio style.

Modern Java noteThis archive has been refreshed for Java 25 LTS. Core language concepts remain useful, while outdated setup instructions and browser-era Java are labeled or replaced. Java 26 is the current feature release; Java 25 is used here as the stable teaching baseline.
go to previous page   go to home page   go to next page        

Answer:

myHome.htmlHobbies/myHobbies.htmlPets/myPets.html
<html>
<head>
<title>My Home Page</title>
</head>
<body>
...

<p>
First you need to 
know about my
<a href="Pets/myPets.html"> 
Pets! </a> 
</p>

<p>
And you must 
marvel at my
<a href=
"Hobbies/myHobbies.html"> 
Hobbies! </a> 
</p>

</body>
</html>

<html>
<head>
<title>My Hobbies</title>
</head>
<body>

...

<p>
Click here to return to
<a href="../myHome.html"> 
my Home Page </a> 
</p>


</body>
</html>

<html>
<head>
<title>My Pets</title>
</head>
<body>

...

<p>
Click here to return to
<a href="../myHome.html"> 
my Home Page </a> 
</p>


</body>
</html>


Uniform Resource Locators

A URL (Uniform Resource Locator) is an address on the Web. It uniquely identifies each Web resource (Web page, image, audio file, animation, ...). URLs follow the same format (are "uniform") for all computer hardware and software. When your browser needs a particular resource it sends its request over the Internet. Since all machines connected to the internet use the same URL format the request can be routed through many different machines until it reaches the one holding the desired resource.

Like a Post Office mail address, a URL does not say how to find a particular resource. The route from the requesting machine to the requested resource is determined when the request is made. This is done by the various specialized computers that handle Internet communications.

QUESTION 11:

Is the route from a requesting computer to a resource always the same?