Java Networking - URL

| Page Views: 18 java networking

URL stands for Uniform Resource Locater.

Function of URL
  1. Point to a resource in the World Wide Web. Thus you can use a URL to locate a resource in the web.

For example a URL like points you to a java document in our site.

Example Resources to be located by URL

  1. File e.g webpages, .exe files,video files, images etc.
  2. Directory.
  3. Query to Database.
  4. Search Engine. etc.

Parts of a URL

Let's say we have some URL like this This URL has the following parts:

  1. http - Tells us the protocol we are using, HTTP. HTTP stands for HyperText Transfer Protocol.
  2. : This is the host machine/server where our resource resides on.
  3. java/arraylist - Points us to the particular resource or information in that machine. Note that this may either be a file or a complex query to say database or some dynamic calculation. In other words it can be a static resource or be generated on the fly. This part of the url is called the path component of the URL.

Also optionally the URL can have:

  1. Port - Port number for the TCP connection to be made. If it is not specified just like we haven't in our URL, then the default Port is used, This port for HTTP is normally 80. Otherwise the port can also be specified as follows :

How do You Feel after reading this?

According to scientists, we humans have 8 primary innate emotions: joy, acceptance, fear, surprise, sadness, disgust, anger, and anticipation. Feel free to tell us how you feel about this article using these emotes or via the comment section. This feedback helps us gauge our progress.

Help me Grow.

I set myself some growth ambitions I desire to achieve by this year's end regarding this website and my youtube channel. Am halfway. Help me reach them by:


What do You Think

Previous Post