Step-by-step guide for installing tomcat on windows

Tomcat is an open source java application server provided by Apache, it is the most popular application server for java environment. In this article we provide a step-by-step guide for installing and setting up tomcat in windows environment,  for those who are interested in unix machines you can refer to this guide.

1. Prerequisite

Tomcat doesn’t work without java, so before installing tomcat on the machine, you should install a compatible java runtime version and setup JAVA_HOME environment variable. Both java and tomcat versions should be compatible so i recommend to always install the same version for java and tomcat, in this tutorial we use java 8 and tomcat 8.

Follow this tutorial to setup java on your windows machine.

 2. Installation

There are two ways for installing tomcat in a windows machine, you can either install it as a windows service or as a standalone application.

Tomcat as a windows service:

The main benefit for installing tomcat as a windows service is to allow starting it automatically at the startup of the windows. Following are the steps for installing and setting up tomcat as a windows service:

  1. Download the windows service installer from here.Download Tomcat 8
  2. Install the downloaded file, pass all the setup until reaching Configuration OptionsTomcat 8 configurationhere you can set the service name, the shutdown port and the running port of tomcat, by default tomcat runs on port 8080,  so i recommend to keep the default configuration as it is, you can always change these configuration after the installation.
  3. After completing the installation, the tomcat folder can be found under “C:\Program Files\Apache Software Foundation\Tomcat 8.5”.
  4. If you open the windows services, you find a new service called Apache Tomcat 8.5 Tomcat8, change its startup type to Automatic.

And here you go, tomcat is installed as a windows service, and will start at the windows startup.

Tomcat as a standalone application:

If you want to manage manually the startup of tomcat, you can install it as a standalone application through the following steps:

  1. Download the tomcat zip file from here.Download Tomcat 8
  2. Extract the downloaded zip under “D:” drive.
  3. To start tomcat, run startup.bat” file under “D:\apache-tomcat-7.0.35\bin”.
  4. To stop tomcat, run shutdown.bat” file under “D:\apache-tomcat-7.0.35\bin”.

 3. Configuration

To change the default running port of tomcat, open server.xml” under “D:\apache-tomcat-7.0.35\conf” folder and change the port attribute of Connector tag.

Here, we set tomcat to run on port 9095 , a restart is required for the change to take effect.

Check if tomcat is up

In order to make sure that tomcat is started up correctly on the configured port, just run localhost:9095 url on any browser and if you get the following screen then tomcat is up and ready to serve requests.

Tomcat 8 runs successfully

 4. Tomcat Logging

Tomcat log files can be found under “D:\apache-tomcat-7.0.35\logs”, there are 2 important log files to be checked when investigating applications issues:

  • tomcat8-stderr.<date>.log: This file logs all the runtime exceptions which are thrown by the running application.
  • tomcat8-stdout.<date>.logThis file displays all the trace and info logs generated by the application.

OR if these files are not found, you can check catalina.<date>.log which holds all the exceptions and info logs generated by the application.


Hussein Terek

Founder of, I have a passion in software engineering and everything related to java environment.

You may also like...

Leave a Reply

21 Comment threads
1 Thread replies
Most reacted comment
Hottest comment thread
2 Comment authors
husseinterekUmesh Recent comment authors
newest oldest most voted

Well explained sir. Specially great way of writing your contents. Really this is impressive.
Thanks a lot.
Programmer Mart



Here is a good Weblog You may Come across Interesting that we encourage you to visit.


adam and eve inflatable position pillow

[…]we prefer to honor lots of other online sites around the net, even when they aren’t linked to us, by linking to them. Underneath are some webpages really worth checking out[…]


how to use penis pump

[…]we came across a cool web site that you just may possibly get pleasure from. Take a look when you want[…]


squirting dildo

[…]The information mentioned inside the article are some of the very best readily available […]


thrusting rabbit

[…]The information and facts talked about inside the post are several of the top accessible […]


glass butt plugs

[…]although websites we backlink to beneath are considerably not related to ours, we really feel they’re truly really worth a go through, so possess a look[…]


vibrators for women

[…]Here is a superb Blog You might Uncover Exciting that we Encourage You[…]


best plus size strap on

[…]please take a look at the websites we stick to, including this one particular, as it represents our picks through the web[…]


8 inch dildo

[…]one of our guests recently encouraged the following website[…]


אתרי סקס

[…]please go to the websites we comply with, including this one, because it represents our picks in the web[…]


agen sabung ayam

[…]Wonderful story, reckoned we could combine a couple of unrelated information, nonetheless definitely worth taking a search, whoa did one particular understand about Mid East has got far more problerms at the same time […]


twitter to mp4

[…]Here is an excellent Blog You may Find Exciting that we Encourage You[…]


Adult dating in india

[…]Every as soon as inside a even though we pick blogs that we read. Listed below would be the most up-to-date sites that we opt for […]


bmw vin decoder

[…]The information mentioned inside the report are a number of the ideal out there […]


vibrating panties

[…]just beneath, are numerous completely not related web pages to ours, having said that, they are surely really worth going over[…]


strapless strapon

[…]please visit the web pages we comply with, like this 1, as it represents our picks through the web[…]


inmobiliaria malaga

[…]Here is a good Blog You might Discover Interesting that we Encourage You[…]


realistic dong

[…]please check out the web-sites we comply with, which includes this one particular, because it represents our picks through the web[…]



[…]Wonderful story, reckoned we could combine a number of unrelated information, nevertheless genuinely really worth taking a look, whoa did one master about Mid East has got additional problerms too […]