Apache Tomcat is an open-source web server and servlet container for Java code. Tomcat executes programs written in the Java programming language, and it implements many Java EE specifications, including Jakarta Servlet, Jakarta Server Pages, and others.
In this tutorial, you will learn to install the Apache Tomcat server on Windows.
Prerequisites:
- Java JRE installed and configured
- Administrator privileges
How to Install Tomcat on Windows
In this section, we will cover two ways of installing the Tomcat web server:
- Via Windows Service Installer.
- From a zip archive.
Follow the steps below to download and install Tomcat.
Step 1: Download Tomcat for Windows
To download the Tomcat installation file, follow the steps below:
1. Browse to the official Apache Tomcat website. Locate the Download section and click the latest Tomcat version available. At the time of writing this article, the latest Tomcat version was version 10.
2. On the Download page, scroll down and locate the Binary Distributions area.
In the Core list, depending on the installation type you prefer, click the download link for the Windows Service Installer or the 32bit/64bit Windows zip file.
Step 2: Install Tomcat
Install Tomcat via the Windows Service Installer for an automated and wizard-guided experience. The service installer installs the Tomcat service and runs it automatically when the system boots.
For a portable experience, install Tomcat using the zip file and avoid installing the service. Easily uninstall Tomcat when it is no longer needed by deleting the Tomcat directory, or move it around when necessary.
Note: Take a look at our list of 13 best Java IDEs, which help write, debug, and test Java code.
Method 1: Install Tomcat Using the Windows Service Installer
Follow the steps below to install Tomcat using the Windows Service Installer.
1. Open the downloaded Windows Service Installer file to start the installation process.
2. In the Tomcat Setup welcome screen, click Next to proceed.
3. Read the License Agreement and if you agree to the terms, click I Agree to proceed to the next step.
4. In the Tomcat component selection screen, choose Full in the dropdown menu to ensure the wizard installs the Tomcat Host Manager and Servlet and JSP examples web applications. Alternatively, keep the default Normal installation type and click Next.
5. The next step configures the Tomcat server. For instance, enter the Administrator login credentials or choose a different connection port. When finished, click Next to proceed to the next step.
6. The next step requires you to enter the full path to the JRE directory on your system. The wizard auto-completes this if you have previously set up the Java environment variables. Click Next to proceed to the next step.
7. Choose the Tomcat server install location or keep the default one and click Install.
8. Check the Run Apache Tomcat box to start the service after the installation finishes. Optionally, check the Show Readme box to see the Readme file. To complete the installation, click Finish.
9. A popup window appears that starts the Tomcat service. After the process completes, the window closes automatically. The Apache Tomcat web server is now successfully installed .
Method 2: Install Tomcat Using the zip Archive
Follow the steps below to set up the Tomcat server using the zip archive.
1. After downloading the 32bit/64bit Windows zip file, depending on your Windows version, unzip the downloaded file. Right-click the file and select Extract all…
2. Choose where to extract the archive contents. For easier navigation, we recommend extracting it to the hard drive’s root. Optionally, give the directory a shorter name to facilitate server configuration later. Click Extract to start the process.
3. Navigate to the conf sub-directory within the extracted directory and locate the server.xml file.
Important: Back up the .xml files before making any changes.
4. The default connection port is 8080
. To choose a different port, edit the server.xml file with a text editor, such as Notepad++, and locate the following lines:
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
Change the connector port
number to any number between 1024
and 65535
.
5. To enable directory browsing, locate the web.xml file in the conf directory and edit the file with a text editor. Directory browsing helps when testing the system, and sometimes it may be the solution for a 403 forbidden error.
Locate the following lines and change the listings
value from false
to true
:
<servlet>
<servlet-name>default</servlet-name>
<servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>0</param-value>
</init-param>
<init-param>
<param-name>listings</param-name>
<param-value>false</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
6. Implement an auto-reload feature by editing the context.xml file. Above all, auto-reload is useful in development to prevent restarting the server manually each time a change is made.
Using a text editor, open the context.xml file. Locate the following line and change the value from false
to true
in each instance:
<Context reloadable="false" crossContext="false" parallelAnnotationScanning="false">
......
......
</Context>
7. After making the changes, start the server. Press the Windows key and type cmd. Press Enter to open a Command Prompt window.
8. Move to the bin directory of your Tomcat server and run:
startup
8. Add an exception for Tomcat in the firewall:
9. A new Tomcat console window appears. This console receives error messages and system.out.println()
messages issued by the Java servlets.
10. Access the server using a browser as an HTTP client. Browse to http://localhost:8080 and access the Tomcat welcome page to ensure the server works.
In addition, use the Developer Quick Start links to see more information about the server and start using and configuring the server.
11. Shut down the Tomcat server by pressing Ctrl+C on the Tomcat console.
Step 3: Check if Apache Tomcat Service Is Running
Installing Tomcat using the Windows Service Installer installs Tomcat as a Windows service that automatically runs on boot. Follow the steps below to ensure that Tomcat is started as a Windows service.
1. Open the Start menu and search for Services.
2. Select the Services result.
3. In the Services window, locate the Apache Tomcat service. The Status column indicates whether the service is running or not. Start or Stop the service using the buttons in the toolbar or by pressing Stop or Restart on the left side of the service list.
Configure the service startup by right-clicking the Tomcat service and selecting Properties.
4. In the Properties window, under the Startup type dropdown menu, select how to run the Tomcat service:
- Automatic (Delayed Start). Starts the service shortly after boot. A delayed start improves server boot performance and has security benefits.
- Automatic. Automatically starts the service on boot.
- Manual. The service starts only when Windows or another service needs it or if invoked.
- Disabled. Disables the service startup, even if you try to start it.
Click OK to confirm the changes.
Note: If you are looking for a different operating system, our Knowledge Base also has a tutorial on how to install Tomcat on Ubuntu.
Conclusion
This guide showed how to install the Apache Tomcat web server on Windows. While Tomcat doesn’t provide all the features of Java EE, many applications require only the features that Tomcat provides. Therefore, heavier tools aren’t always necessary.
Learn more about servers in our tutorial on big data servers, or learn what a database server is.
Was this article helpful?
YesNo
Introduction
Are you looking for a way to install Apache Tomcat on Windows 10? If so, then you’ve come to the right place! Apache Tomcat is an open-source web server used for running Java applications. It’s a popular choice for web developers and system administrators alike. In this blog post, we’ll show you how to quickly and easily install Apache Tomcat on Windows 10.
Prerequisites
Before you begin, there are a few things you’ll need to have in order to successfully install Apache Tomcat on Windows 10. First, you’ll need to have the Java Development Kit (JDK) installed on your system. You can download the JDK from the Oracle website. Additionally, you’ll need to have the latest version of Apache Tomcat. You can download the latest version from the Apache Tomcat website.
Installation Steps
Once you have all of the prerequisites out of the way, you can begin the installation process. To start, you’ll need to extract the Apache Tomcat files to a directory of your choice. You can do this by right-clicking on the downloaded file and selecting “Extract All”. Once the files have been extracted, you’ll need to open a command prompt and navigate to the directory where you extracted the files.
Next, you’ll need to run the “startup.bat” file. This will start the Apache Tomcat server. Once the server is running, you can access the web interface by navigating to http://localhost:8080 in your browser.
And that’s it! You’ve successfully installed Apache Tomcat on Windows 10. Now you’re ready to start developing and deploying Java applications.
If you’re looking for a way to install Apache Tomcat on Windows 10, then you’re in luck. With just a few simple steps, you can set up Apache Tomcat on your Windows 10 system and start using it right away. The process is surprisingly simple and straightforward, and it only takes a few minutes to get up and running. You’ll be able to enjoy the benefits of Apache Tomcat, such as its powerful web server capabilities, without having to worry about the complexities of setting up a web server from scratch. So don’t wait any longer — discover the amazingly simple way to install Apache Tomcat on Windows 10 today!
Frequently Asked Questions (FAQ) :
Q1: What is Apache Tomcat?
A1: Apache Tomcat is an open source web server and servlet container developed by the Apache Software Foundation. It is used to deploy Java-based web applications and provides a “pure Java” HTTP web server environment for Java code to run in.
Q2: What are the benefits of using Apache Tomcat?
A2: Apache Tomcat provides a simple and reliable environment for running Java web applications. It is lightweight, highly configurable, and provides an easy-to-use interface for deploying and managing web applications. It is also highly secure and supports a wide range of web technologies.
Q3: How do I install Apache Tomcat on Windows 10?
A3: Installing Apache Tomcat on Windows 10 is easy. First, download the latest version of Tomcat from the Apache website. Then, unzip the Tomcat zip file, and run the Tomcat setup wizard. Finally, configure Tomcat using the Tomcat Manager.
Q4: What are the system requirements for running Apache Tomcat?
A4: Apache Tomcat requires a Java Runtime Environment (JRE) version 8 or higher, as well as a web server such as Apache or Microsoft IIS. Additionally, Tomcat requires a minimum of 512MB of RAM and 40MB of disk space.
Q5: How do I start and stop Apache Tomcat?
A5: Starting and stopping Apache Tomcat is easy. To start Tomcat, open the Tomcat configuration folder and double-click the Tomcat startup script. To stop Tomcat, open the Tomcat configuration folder and double-click the Tomcat shutdown script.
How To Install Apache Tomcat on Windows 10 7
Apache Tomcat is a web server, or application server. Tomcat is java web servlet container and web server from the Apache software foundation. It can be used as standalone or it can be used behind traditional web servers such as Apache httpd. In the following steps i will show you how to install tomcat in windows 7 or windows 10 or 8.
Install Apache Tomcat on Windows 10
Download Apache Tomcat
download Apache tomcat 9 from here http://mirrors.estointernet.in/apache/tomcat/tomcat-9/v9.0.16/bin/apache-tomcat-9.0.16-windows-x64.zip
or
https://tomcat.apache.org/download-90.cgi
download apcahe tomcat 8 from here http://mirrors.estointernet.in/apache/tomcat/tomcat-8/v8.5.37/bin/apache-tomcat-8.5.37-windows-x64.zip
or
https://tomcat.apache.org/download-80.cgi
download apcahe tomcat 7 from here http://mirrors.estointernet.in/apache/tomcat/tomcat-7/v7.0.92/bin/apache-tomcat-7.0.92-windows-x64.zip
or
https://tomcat.apache.org/download-70.cgi
By using above links download tomcat version 9 or 8 or 7 which you want in a zip format.
Extract Apache Tomcat
extract the zip file which you downloaded.
Install Apache Tomcat on Windows 10 7
Setup Java
To run tomcat you need java in your system. if you have java installed in your system you have to set path varibles. if you have not installed yet you can refer here.
- How To install java in windows 7 8 10
Set java path variables
Right Click on computer and click on properties. Click on advanced system settings it will open environment variables window.Click on environment variables you can see system variables. click on new.
Right Click on computer==>properties==> advanced system settings==>environment variables==>new(system varibles)
Add new variable by clicking on new
Adding PATH Variable:
Variable name is PATH
Variable value C:\Program Files\Java\jdk-10.0.2\bin
if you have already installed java in your system you can find this value c:\programfiles\java. here we have to enter path value up to your jdk version bin folder.
Adding JAVA_HOME variable
Variable name is JAVA_HOME
Variable value is C:\Program Files\Java\jdk-10.0.2
you can find this value c:\programfiles\java. here we have to enter path value up to your jdk version.
Run Tomcat How To Install Tomcat on Windows 10
we have successfully configured java in your system now go to the folder of tomcat which you extracted. and go to the bin folder, here you can see startup windows batch file double click on that. and run this. that’s it tomcat will start in few seconds.
you can now open the browser and type http://localhost:8080
it will show the tomcat server.
- how to install tomcat
- install apache tomcat
- how to install tomcat 9 on windows 10
- apache tomcat 10 download
- install apache tomcat on windows 7
- how to install apache tomcat on windows 10
- apache tomcat download for windows 10
- apache tomcat 7.0.47 download
- apache tomcat 9 download
Download Article
A complete guide for beginners to get Tomcat up and running fast
Download Article
- Installing & Configuring Java
- Installing Tomcat
- Tips
|
|
Tomcat is a popular open-source web server that runs Java applications. Whether you’re a Java developer, a system administrator, or just a beginner, installing Tomcat on Windows is simple. Once you’ve installed the latest version of Java, you can download and run the latest Tomcat Windows Service Installer, which walks you through the rest of the setup. This wikiHow guide teaches you how to install the Apache Tomcat web server environment on your Windows PC.
Things You Should Know
- You’ll need Java 11 or later to run Tomcat. If you’re using an earlier version, download and install the latest JDK.
- When running the Tomcat installer, select the «Full» installation to install the management interfaces and make Tomcat launch automatically.
- You won’t see a Tomcat icon in the system tray when Tomcat is running, but you’ll see its process in Task Manager.
-
To run the latest version of Apache Tomcat on Windows, you’ll to install Java 11 or later.[1]
To get the latest version of Java, you’ll want to download the latest JDK (Java Development Toolkit) installer:- Go to https://www.oracle.com/java/technologies/downloads/ and click the Windows tab.
- Click the download link next to «x64 Installer» to save the installer to your PC.
- If you’ve already installed Java, skip to Installing Tomcat.
-
Double-click the file you downloaded, then follow the on-screen instructions on the installer. Once Java is installed, click Close on the wizard.
- Java will install to C:\Program Files\Java\jdk(version number) by default.
Advertisement
-
Once installed, press Windows key + E to open File Explorer, click This PC in the left panel, and navigate to Program Files > Java.
- If you installed Java in a different location, go to that location now.
-
For example, you’ll see a folder called jdk-21 (if you installed Java 21) in the Java folder. Double-click the JDK folder to open it.
-
At the top of File Explorer, click the path to the folder, select the full path to the current folder, right-click it, and select Copy on the menu.
-
Now that the path is copied, you’ll need to update your environment variables. To open System Properties:
- Type advanced system into the Windows search bar.
- Click View advanced system settings.
-
This button is near the bottom-right corner of the dialogue box.
-
This section is the second box at the bottom of the Environment Variables window.
-
This will be the name of your new system variable.
-
Right-click the bottom field and select Paste to paste the copied folder directory.
-
This will add your new system variable.
-
Scroll down the variable list in the bottom box, and click Path to select it.
-
This will allow you to edit the contents of the Path variable in a new dialogue box.
-
It’s in the upper-right corner of the window. This will add a new entry at the bottom of the list.
-
This will be added to the Path variable in your system.
- Click OK 2 more times until all System Properties windows are closed. You are now ready to download and install the Tomcat files on your computer.
Advertisement
-
As of October 2023, you can download Apache Tomcat 10.1.14. The Apache Software Foundation recommends using the Windows Service Installer, which makes it easy to install Tomcat on both 64-bit and 32-bit Windows systems.[2]
- Go to https://tomcat.apache.org.
- Click the Tomcat 10 link in the left panel.
- Under «Binary Distributions,» click 32-bit/64-bit Windows Service Installer.
- If prompted, select a saving location for the installer file.
-
This will open the License Agreement on a new page.
-
It’s on the bottom-right corner of the installer window.
-
This option ensures that you’ll be installing the core aspects of Tomcat, a script that launches the server automatically at boot time, the admin management panel, the Tomcat Host app, and the Servlet and JSP Examples web app.
- Optionally, you can click and uncheck the components you don’t want to install on the list here.
-
By default, Tomcat will run on port 8080. If you want it to run on a different port, replace the port. You can also give the Tomcat service a name other than «Tomcat10,» and create an administrator username and password for the HTML interfaces here.
- You will need to open TCP port 8080 (or the custom port you entered) to allow inbound connections.
-
When you’re prompted to specify the location of your JRE (Java Runtime Environment), click this button to select your file location.
-
The default path is C:\Program Files\Java\jdk(version number).
-
By default, Tomcat will install to C:\Program Files\Apache Software Foundation\Tomcat 10.1. You can change the installation location if you’d like. Once you click Install, Tomcat will install on Windows.
-
When your Tomcat setup is finished, click this button to close the installer. If you leave the «Run Apache Tomcat» option selected, Tomcat will launch instantly.
- Because you chose the Full installation, the Windows Tomcat service will launch automatically each time you restart your PC.
- Even though Tomcat is running, you won’t see an icon for it in your system tray. However, when you open Task Manager, you’ll see it on the Processes tab and an entry for it on the Startup apps tab.
-
Instead of editing configuration files directly, you can use this GUI tool in your Start menu to adjust the following:
- Control whether the Tomcat service launches automatically.
- Choose whether to log on as a local service account, network service account, local system account, or a specific account.
- Choose what appears in your server logs and where the server logs are stored.
- Specify which version of Java to use (helpful if you install more than one version), and specify Java options, memory preferences, and classpath.
- Add startup flags to Tomcat (check the Readme file for options).
- Choose shutdown options.
Advertisement
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement
-
Tomcat has an HTML management interface that makes creating and managing virtual hosts on your server easy. You can open Host Manager by clicking Host Manager in the «Apache Tomcat» group in your Start menu.[3]
-
You can control who has access to Host Manager and Tomcat Manager by editing the tomcat-users.xml file in C:\Program Files\Tomcat 10.1\conf.[4]
-
To deploy web applications, use Tomcat Manager in your browser. You can get there by navigating to https//127.0.0.1/manager/html.
Thanks for submitting a tip for review!
Advertisement
References
About This Article
Article SummaryX
1. Install and configure Java JDK.
2. Download the Tomcat 9 installer from https://tomcat.apache.org/download-90.cgi.
3. Launch the installer.
4. Click Next, and then I Agree.
5. Select the Full install, and click Next twice.
6. Click the three-dot button to specify JRE location.
7. Select your jre folder, and click OK.
8. Click Next, and then Install.
9. Click Finish.
Did this summary help you?
Thanks to all authors for creating a page that has been read 49,793 times.
Is this article up to date?
Hi. How are you? Let’s see how to install Apache Tomcat on Windows 10/ Server. It works as a servlet container developed under the Jakarta project at the Apache Software Foundation. In addition, it is written in Java, for that reason it works in any operating system that has the Java virtual machine. It can also be used with XAMPP. Besides, Tomcat can function as a Web server on its own with support for servlets and JSP. Despite being surpassed in popularity by NGINX and Apache Web Server, it is still an interesting option to try. That’s why I show you how to install Apache Tomcat on Windows 10/Server.
Prerequisites. Install Java Development Kit JDK.
As we have mentioned, Tomcat is a software developed in Java. For that reason, it is mandatory to download and install JDK in order to run it. With that in mind please go to the download page. You need to have an Oracle account, but don’t worry it’s a fast and free process.
Once you have downloaded the installer, please double click on it to start the process.
Adding environment variables.
To ensure the proper functioning of the server, it is necessary to add Java to the Windows environment variables. If you don’t know how to do this, please check out our article on Wget in Windows 10. First, create a variable with the name JAVA_HOME and use the address where JDK was installed: C:\Program Files\Java\jdk1.8.0_231
Then create another environment variable with the name JAVA_JRE. In this case, use the following address: C:\Program Files\Java\jre1.8.0_231
Installing Apache Tomcat
Once JDK is installed and configured, it is time to install Tomcat. With that intention go to the program page and download the latest Windows Service installer. At the time of publication of this article, the version is 9.0.27.
After downloading the installer, proceed to run it. Press Next to continue.
Then choose the components to install. You can select the ones you want, but I recommend that you do a full installation.
In the next window, you will see the configuration options. You can leave almost everything by default. Just keep in mind that the ports must be free. In addition, add a username and password.
Now select the path where JDK is installed.
Now set the installation path for Apache Tomcat.
Once all the configurations have been completed, the installation process will begin.
Finally, the wizard will have finished its work, and we will have Tomcat installed in the system.
Now, to test that the server is properly installed and running, please open a web browser. Then go to this address: http://localhost:8080/ If you’ve done everything right, the page should look like this:
Conclusion.
Ultimately we have seen how to install Tomcat on Windows 10/Server. The procedure with the installer is very intuitive and easy to use. In addition, the wizard installs Tomcat as a Windows service. So no additional configuration is required. You only need to have installed and preconfigured Java Development Kit. This is all for now, see you soon.
— Advertisement —
Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
«The best Linux newsletter on the web»