Jenkins + Tomcat: How to Set It Up
June 3, 2022

Jenkins + Tomcat: How to Set It Up

Open Source Automation

Want to use Jenkins and Tomcat together? You're in the right spot.

Here, I'll break down everything you need to know to set up Jenkins, the open source automation server for CI/CD, with Tomcat, the open source Java HTTP web server environment. This is a step-by-step guide for you that you can easily follow to get yourself up and running.

Back to top

Why Use Jenkins + Tomcat?

Apache Tomcat is a powerful servlet Java container for running web applications. If you are running your apps in Tomcat, or wish to do so, you might also want to run Jenkins in it. This creates a unified experience, which is easier to manage.

Jenkins is an open source automation server, commonly used for CI/CD (continuous integration / continuous deployment). Jenkins’ hundreds of plugins enable developers to automate their software development lifecycle, including building and deploying of code and features.

Jenkins is also a great way achieve agile testing by leveraging continuous feedback and higher code quality — which translates to faster deliveries. That way you can beat competition to market.

If you are looking to install Jenkins in other ways, read how to install Jenkins on Windows and with a WAR file.

Now, let’s get started.

Back to top

How to Set Up Jenkins + Tomcat

Here's how you can set up Jenkins + Tomcat.

1. Install JDK

First, install JDK. Jenkins supports Java 8. If you need help with installing Java, go to this link.

2. Install the Tomcat Server

Next, we'l install Tomcat. If you have already installed Tomcat, jump to step 3 to install Jenkins. 

a. Go to the Tomcat Site

Go to the official Tomcat website and choose the Tomcat version to download on your machine. In this example, I chose version 9.


A screenshot of the Tomcat website.

📘 Related Resource: Learn more about Apache Tomcat Solutions

b. Choose Your Binary

Choose the appropriate binary for your machine. In this case, I chose the binary for Windows 64-bit, which you can see below.


A screenshot of where to go on the Tomcat website to install it.


c. Copy the Download Zip File

Copy the downloaded zip file to the location of your choice and unzip it. In this example, I copied it to the folder C:\Tomcat.


A screenshot of installing Tomcat in the Windows directory.


d. Go to the Subfolder

Go to the sub folder bin and click on the startup windows bat file.


A screenshot of how to get to startup for Tomcat in a Windows directory.


The Tomcat server will start running.


A screenshot of how to start the Tomcat server.


e. Launch Tomcat

Browse to the url http://localhost:8080 to launch the Tomcat server.


A screenshot of the Apache Tomcat 9.0.10 website.


Now that Tomcat is installed, it's time to move on to the next step: installing Jenkins.

Ready to revolutionize how you test with Jenkins + Tomcat? Start testing with BlazeMeter for FREE today!

Start Testing Now

3. Install Jenkins

We can now install Jenkins. 

a. Download the Latest WAR File

Download the latest Jenkins WAR file here.

b. Copy the WAR File

Copy the jenkins.war file to the subfolder webapps in the Tomcat installation. It will auto generate a jenkins folder on your machine.

A screenshot of where to find the jenkins.war file in the Windows directory.


c. Launch Jenkins

Go to the url http://localhost:8080/jenkins to launch the initial Jenkins page.


A screenshot of how to unlock Jenkins when you launch it.


d. Unlock Jenkins

To unlock Jenkins, paste the random password copied from the file C:\Users\\.jenkins\secrets\initialAdminPassword. Paste it in the Administrator password field and then click on the “Continue” button to proceed.


A screenshot of where to enter your password in the Jenkins startup.


e. Install Suggested Plugins

Either click on “Install suggested plugins” to install the default plugins or “Select plugins to install” to install the plugins you want. In this case we will install the default suggested plugins.


A screenshot of how to install suggested plugins in Jenkins setup.

f. Wait

The plugins will install, I promise! So please wait until this process is completed.


A screenshot of the Getting Started section in Jenkins.


g. Create Admin User

Create your first admin user for Jenkins and click on the “Save and Continue” button.


A screenshot of creating your first admin user in Jenkins.

h. Complete the Installation

Click “Save and Finish” to complete the installation.


A screenshot of the final installation section of Jenkins.

i. Start Using Jenkins

This is the last step! Click in “Start using Jenkins” to open the default Jenkins page.


A screenshot of Jenkins all set up and ready to start using.

j. Get Started With Jenkins and Tomcat 

You can now start your job with Jenkins and Tomcat.


A screenshot of a Jenkins job.

Back to top

Bottom Line

You now know how to create a more cohesive experience by using Jenkins and Tomcat together. But whatever you do with Jenkins, it is important to make sure that you add your performance and load tests to the CI cycle.

And the best way to do it? Using BlazeMeter.

BlazeMeter integrates seamlessly with Jenkins, allowing you to not just add performance testing, but to accelerate and scale your performance testing. With Jenkins and BlazeMeter, you can continuously run your tests. You can schedule them to run after every build, every night, quarterly or according to any other business and technological criteria you have.

See Jenkins and BlazeMeter in action. Start testing with BlazeMeter today. 

This blog was originally published on August 1, 2018 and has since been updated for accuracy and relevance.



Related Resources

Back to top