Installing Apache Tomcat 6.x in Windows

5 May 2012 By Nithya Vasudevan 48,208 views 19 Comments
15 Flares Twitter 0 Facebook 12 Google+ 3 15 Flares ×

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:
http://tomcat.apache.org/download-60.cgi
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.

Tags: , , , , , , , , ,

  • Ms. Yuta Lolap

    HTTP Status 404 – /Struts2/

    ——————————————————————————–

    type Status report

    message /Struts2/

    description The requested resource (/Struts2/) is not available.

    above error is what i am getting when i run my project. Please help me in this problem.

    • http://theopentutorials.com Praveen Macherla

      Give the full path of the resource /Struts2/someaction.do Also check the console for any deployment errors.

  • Archana

    Thanks so much. Very detailed steps. Really Helped.

  • Arun

    Thanks…

  • Vasu

    Good One .. Thanks…

  • sreenivas

    Good :)

  • Venkat

    Hi i need a wsdl file with multiple security tokens configured in it. Can you provide me a WSDL file which has security tags in it. Am interested in learning about securities in web services.

  • raju

    Thanks a lot. Used for Tomcat 7 and worked just fine.

  • Annie

    Thanks a lot. Really worked :)

  • Devanshi

    Its not working in my case. I extracted it on given location for Tomcat 7 but when i am starting my browser it is not working.. what to do now???

  • Devanshi

    It didn’t work with zip file. but when i tried with .exe it did. But i still don’t know what was the problem with .zip file or what else i needed to do in that. If anyone can help??

  • shweta

    thankx

  • jlprasad

    In Windows using zip file:
    —————————-
    In after unzip Tomcat in “C:Tomcat6” directory, how should i specifying the path in Environmental variables?

  • jlprasad

    In Windows using zip file:
    —————————-
    Here after unzip Tomcat in “C:Tomcat6” directory,is there need to specify environmental variable for this tomcat?
    how should i specifying the Environmental variables for the “unziped tomcat”?

  • vinod

    Thanks so much for sharing tomcat installation guide detailed …very useful.

  • Aditya

    Thank you! Very Detailed & Helpful indeed!

  • jitendra

    thank you!

  • victor kimaiyo

    its working very well with me!

  • charu

    thank you sir