Installing Apache Tomcat 6.x in Windows

Apache Tomcat (or simply Tomcat) is an open source web server and Servlet container developed by the Apache Software Foundation (ASF). Tomcat implements the Java Servlet and the JavaServer Pages (JSP) specifications.

This tutorial provides step by step explanation of how to install Apache Tomcat in Windows OS.

Environment Used

  • JDK 6 (Java SE 6)
  • Apache Tomcat 6.x
  • Windows OS

Tomcat 6 requires any installed Java 5 or later JRE (32-bit or 64-bit). We have used JRE 6.

Installing JDK

JDK should be installed with proper environment set up. Read this page for installing the JDK and setting up the environment. Installing JDK automatically installs JRE.

Downloading Apache Tomcat

If you need to install Tomcat, you can download it from this location:
NOTE:This tutorial uses “Apache Tomcat 6.0.35” version.

Installing Apache Tomcat

You can install Tomcat on any operating system that supports the zip or tar formats.

In Windows using zip file

To install Apache Tomcat, all you have to do is simply unzip the downloaded (.zip) file to a safe location on your machine. For simplicity and easy access, we recommend you to unzip Tomcat in “C:\Tomcat6\” directory.

In Windows using .exe (Windows Service Installer) file

After downloading the Windows installer file (.exe) file, simply double-click on the .exe file and follow the steps below to install Apache Tomcat.

Welcome screen

Simply click on the ‘Next‘ button to continue installation process.

License Agreement screen

Accept the terms of the agreement by clicking on ‘I Agree‘ button.

Choose the components

Choose the features of Apache Tomcat you want to install by checking the components and click ‘Next‘.

Tomcat Configuration options
  • The default port number for Tomcat to process HTTP requests is 8080. You can either change the port number here or change it later after the installation in server.xml which is located in /conf/server.xml. We recommend to have the default value.
  • You can provide the username and password for Administrator login but here, we leave it as blank.
  • Now, click on the ‘Next‘ button.

Installed JRE path
  • The installer uses the registry to determine the base path of a Java 5 or later JRE, including the JRE installed as part of the full JDK.
  • When running on a 64-bit operating system, the installer will first look for a 64-bit JRE and only look for a 32-bit JRE if a 64-bit JRE is not found.
  • It is not mandatory to use the default JRE detected by the installer. Any installed Java 5 or later JRE (32-bit or 64-bit) may be used by clicking on the browse button and click ‘Next‘.

Choose Installation Location

In Windows, by default the location will be provided as ‘C:\Program Files\Apache Software Foundation\Tomcat 6.0’. But for simplicity, we recommend you to use ‘C:\Tomcat6‘ as shown below and click ‘Install‘.

Installing window is displayed.

Tomcat setup completion window is displayed as shown below and click on ‘Finish‘ button.

Apache Service Manager window appears which is attempting to start the Tomcat service.

Once the service has been started, an Apache Tomcat icon appears on Windows Taskbar (bottom right).

Test your installation

Open browser and type http://localhost:8080. You should see the Apache Tomcat home page as shown below.

Configuring Apache Tomcat

You can configure the Tomcat in many ways,

  • Double-click on the Tomcat icon in Taskbar to open the Apache Tomcat properties dialog box as shown below.

Select Manual as startup type and start the server (if you are managing the tomcat manually) or stop the server (We can start the Tomcat server inside any IDE such as, Eclipse, NetBeans, etc) and click OK.

  • Double-click on /bin/Tomcat6w.exe (in our case, it is C:\Tomcat6\bin) and follow the step as above. If it did not open the Apache Tomcat properties window then try to run it as administrator (Right click on exe file->Run as administrator).
  • Using Windows Services
    • Open Control Panel\Administrative Tools and double-click on Services.
    • Double-click on Apache Tomcat service and do as above.

  • Waste of Time

    incomplete instructions. I used zip unpack on Windows. No instructions on how to start server – assume that user used .exe install option. when tomcat started from Eclipse and accessed via localhost:8080, I get 404

Leave a Comment

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