Wednesday, 5 February 2014

Download and install Apache Tomcat

This is another in a series of videos that I am producing for my YouTube channel HowDoYouDoStuff.

In this video, I am going to show you how to download and install Apache Tomcat

You can read the transcript below.

HTML 5 Player


Hi guys. I'm Phil Stirpe.

In this video, I am going to show you how easy it is to download and install Apache Tomcat.

In an earlier video, I showed you how to write a simple program in Eclipse.

Well if we are going to develop Java web applications, then we really should consider installing a container such as Apache Tomcat to host our application.

I'll start by jumping into my browser and searching for "apache tomcat download".

That results in plenty of hits, and the one I'll take is this one for

New versions of Tomcat are released from time to time.

I actually recorded the screen for this demo quite some time ago which is why the latest version is showing up as 7. In fact, the latest version available today is version 8(beta).

So I'll click on the link for version 7 and then scroll down the page to locate the various downloadable pages.

I'll be using it on a 64bit Windows machine so I'll choose the Windows Installer option. Alternatively, I could have selected a zip file instead.

When prompted, I'll place the installer in my Java Demo folder. It just takes a couple of seconds.

If, I switch into the Java Demo folder, you will see the installer file.

Before I run the installer, I am just going to create a folder in the root of C: named ApacheGroup.

This isn't necessary but over time I am likely to install a number of tools produced by Apache such as Maven and possibly even other versions of Tomcat. By creating a folder like this, it will be easier for me to manage them.

OK. Now that I have created my ApacheGroup folder, I can head back over to the Java Demo folder to run the installer. Before I do, I will just copy the file name from the installer as that will do nicely for an installation folder name.

As soon as I run the installer, I am asked to accept the licence terms.

On the Components page, I'll select all of the bits and then click the Next button.

The Configuration screen allows me to update the various port numbers. If I wanted to, I could change the port for HTTP from 8080 which is the norm. I'll leave that as it is.

I could also specify a user name and password to secure Tomcat which is a good idea but for now, I will leave these fields empty.

When you install Tomcat, it is presumed that you have already installed the Java runtime and so the next screen prompts you confirm its location. As I installed Java to its default location, this path is correct.

Now it's time to specify where to install Tomcat.

If you recall, I created a folder named ApacheGroup earlier and that is where I would like to install to.

So I'll browse to the ApacheGroup folder and then create a new folder within it.

I can paste in the name that I copied from the installer earlier as my target folder name and then go ahead with the installation.

Before long, I receive a warning that the Tomcat service is unable to start. I'll ignore that warning for now as I'll be able to start it manually later.

Once the installation is complete, I have the option for it to launch when I click the Finish button. I am going to decline. I am also going to uncheck the Readme box before clicking Finish.

If I open up the installation folder, you can see the various files and folders that comprise Tomcat.

Let me look in the bin folder.

There are several files in here but the two that interest me are a pair of batch files named startup.bat and shutdown.bat.

These batch files enable me to start and stop the Tomcat service when required.

I'd like to run these batch files from the Command Prompt so I will just make a note of the current path, launch the Command Prompt, type "cd" and then finally paste the folder path.

If I type "startup" from the Command Prompt, a separate window opens and we can see various status messages indicating that Tomcat is launching.

By the way, the eagle eyed amongst you might spot mention of applications such as webAppCH02.war being deployed. This is because, I actually copied some of my exported java projects into Tomcat's wepapps folder following the install but have edited that segment from the video. It has nothing to do with the current demo.

Well the server appears to be running but we need some form of test to make sure.

So I'll jump into a browser and try navigating to http://localhost:8080.

And there you will see Tomcat's landing page.

This proves that Tomcat is indeed running on the local machine and listening on port 8080.

Now let's see what happens if I switch back to the Command Prompt and run the shutdown batch file.

When I return to the browser and refresh the page, I receive a warning telling me that it was unable to connect.

Clearly, it is not enough to have Tomcat installed. I will need to install some web applications on this server for it to be of use.

That will be the subject of future videos.

There you have it.

In this video, I have shown you how easy it is to download and install Apache Tomcat.

Thanks for watching and please feel free to comment on my blog ( and Facebook page ( Perhaps you could suggest more video topics? Most of all, don't forget to subscribe to keep up with my videos as I release them.

Bye for now.

Flash Player

See you soon

Phil Stirpé
"I don't do average!"

No comments:

Post a Comment