tscheuerman
Posts: 43
Joined: Thu Feb 11, 2016 11:39 pm

Deploying a war file into an existing Tomcat installation.

I am looking for suggestions on the best approach for deploying a web application's war file into an EXISTING Tomcat installation. I do NOT want to include the installation of Tomcat in the installer as this forces a customer to be tied to a specific Tomcat version. By not including Tomcat in the installer, this allows a user to update Tomcat versions and then simply redeploy the war file.

I will require/check that:

- The expected JDK is installed.
- A minimum supported Tomcat version is installed.
- The web application is not already installed.

The installer will ask the user what the path is to the Tomcat installation the war file will be installed at. Using this path (i.e. <install path>\webapps) copy the war file to this location. I am not sure what exactly Tomcat will do when it sees the new war file? I expected I will also need the installer to create the necessary startup and stop services?

Does this make sense? Am I missing any other important steps the installer needs to handle? Any suggestions would be great!

Thanks in advance!
Todd Scheuerman
Catalin
Posts: 7845
Joined: Wed Jun 13, 2018 7:49 am

Re: Deploying a war file into an existing Tomcat installation.

Hello Todd,

First of all, please note that I am not an expert in Tomcat whatsoever.

However, regarding your setup requirements, I will do my best to assist.
I will require/check that:

- The expected JDK is installed.
- A minimum supported Tomcat version is installed.
- The web application is not already installed.
For this specific requirement, you will have to identify an element (e.g. a registry entry / a file) that would point to the products you need being installed. After that, you can either:

a) create a search for each requirement

b) do all that from within a custom action (e.g. a PowerShell script).

Now, regarding the custom dialog you need to let your user choose where to install the .WAR file, here is an article:

How to browse for a folder at install time

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”