Skip to content

Installing a Local Servlet Container: Tomcat

Learn how to install Apache Tomcat on Windows step by step, run it as administrator and check that your local Servlet container works.

Ramón Invarato

Before we start the installation, you need to have the Java JRE installed. You can download it from: Java Downloads (Oracle)

To install Tomcat on Windows, go to its website: Apache Tomcat

In the left column, select the version you want (obviously, we recommend the latest one).

Screenshot of tomcat.apache.org with the Tomcat versions highlighted in the Download menu

 

At the time of writing this tutorial, the latest version available was 7.0.

Select “32-bit/64-bit Windows Service Installer” to start downloading Tomcat.

Screenshot of the Tomcat 7 downloads page with the "32-bit/64-bit Windows Service Installer" link highlighted

 

Once you have the exe file, run it.

Icon of the downloaded apache-tomcat-7.0.27.exe installer

 

Install Tomcat by clicking “Next” on the welcome screen.

Screenshot of the Tomcat setup wizard welcome screen with the Next button highlighted

 

On the next screen, accept the terms by clicking “I Agree”.

Screenshot of the Tomcat installer license agreement with the I Agree button highlighted

 

Check all the boxes (“Examples” is optional) and click “next”.

Screenshot of the Tomcat installer choosing components, all boxes checked and Next highlighted

 

In the next window, check “Create shorcuts for all users” if you want shortcuts to be created. You can also enter a username and password if you like, although it isn’t necessary if you’re just going to tinker around. Then click “next”.

Screenshot of the Tomcat configuration step with ports, shortcuts option highlighted and user fields

 

In the next window, choose the location on your disk where the Java JRE is installed. By default the installer finds it on its own; if not, you’ll have to browse for it. Click “next” again.

Screenshot of the Tomcat installer selecting the Java JRE path, with Next highlighted

 

Now you need to tell the installer where on your disk you want to install Tomcat. Finish with “Install”. The installation will begin, and when it finishes, close the installer.

Screenshot of the Apache Tomcat installer with the C:\Tomcat 7.0 destination folder and the Install button highlighted

 

Tomcat is now installed. Next we have to run it. On Windows Vista and later, you need to run it with Administrator permissions (otherwise Tomcat will throw an error on startup). To do that, right-click the shortcut (if it isn’t on the desktop, it will be under All Programs; you can also search for “Monitor Tomcat” in the Windows search box) and select “Run as administrator”.

Screenshot of the Windows Start menu with Monitor Tomcat and the Run as administrator option highlighted

 

You’ll know Tomcat is running when you see a feather with a green arrow next to the Windows clock (to access all the settings or to stop Tomcat from Windows, just right-click the feather and the options will appear).

Screenshot of the Tomcat tray icon next to the Windows clock with its menu: configure, stop service and exit

 

To check that Tomcat was installed correctly, do the following. With Tomcat running, open a browser and enter the address: http://localhost:8080/

If you see the Tomcat tiger and the success message that says “If you’re seeing this, you’ve successfully installed Tomcat. Congratulations!”, then everything is ready.

Screenshot of the browser at localhost:8080 showing the Apache Tomcat 7.0.27 welcome page with the success message

 

“Installing a Local Servlet Container: Tomcat” by Ramón Invarato at jarroba.com, licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0. Registered at Safe Creative.

Ramón Invarato

I design and build data platforms and intelligent systems, and I enjoy sharing that experience here.

You may also like

Installing XAMPP on Windows

Learn what XAMPP is, how to download and install it on Windows, and test your setup with a simple PHP example running on your local Apache server.

Feb 13, 2012

Comments

Leave a comment


This site uses Akismet to reduce spam. Learn how your comment data is processed.