×
☰ See All Chapters

How to install tomcat in windows

In this tutorial you will learn to install and setup tomcat server on windows operating system.

Step 1: Download apache tomcat from apache website

Tomcat server comes in two flavors, installation type and portable type. Most of the developers choose portable version. Portable version means, software copy is not required to install in OS, just we need to configure it.  If you are interested in installation version please go ahead with that. In our tutorials we use portable version of server.

Download apache tomcat from apache website https://tomcat.apache.org/download-80.cgi

tomcat-installation-0
 

Step 2: Extract the server files from compressed file

After downloading, extract the server files from compressed file. Extracted folder can be kept anywhere.

tomcat-installation-1
 

Step 3: Start the server

Navigate to the folder path, <base path of the server>\apache-tomcat-8.5.31\bin

Example: C:\Java Development Environment\Servers\apache-tomcat-8.5.31\bin

Find the file “startup.bat” and execute this file (double click to launch). This will start the server.

tomcat-installation-2
 

Once the server is started without any error, we can see the started success message.

tomcat-installation-3
 

Step 4: Test localhost URL from browser

Open this URL in browser https://localhost:8080/

You should see Apache Tomcat configuration home screen.

tomcat-installation-4
 

Now this server can be used to deploy web applications. In next chapter we will study creating web applications using servlet, and will study how to deploy web applications.

Tomcat uses the port number 8080, if any other application installed in your OS is already using this port number; you have to change the port number for tomcat.

To change the port number of tomcat open this file <base path of the server>\apache-tomcat-8.5.31\conf\server.xml

Example: C:\Java Development Environment\Servers\apache-tomcat-8.5.31\conf\server.xml

Change the port number to 8090 or any other.

tomcat-installation-5
 

After changing the port number save it and restart the server. And check back in browser.

tomcat-installation-6
 

All Chapters
Author