App Deployment to Tomcat
Learn how to deploy a WaveMaker app to the Tomcat server.
WaveMaker Apps can be exported as a WAR file. This generated file can be deployed to any standard Java Web Server running on JDK 1.8. This section walks through the steps to deploy WaveMaker app to Tomcat. You can know more about Deployment to Web Server from here.
Supported Versions
WaveMaker application can be deployed on any of the following versions of the Tomcat:
- 8.5.48 onwards for 8.5.x
- 9.0.28 onwards for 9.0.x
The minimum required JDK version is 1.8.
Prerequisites
- Tomcat has to be installed & running
- Tomcat user credential that has the role of
manager-gui
for Tomcatv8.5.x
andv9.x
- WaveMaker application war file to be deployed.
Typical Hardware Requirements
- *4 GB RAM, 2 core CPU, 50GB disk**
*Capacity planning with your application and its expected usage will yeild more accurate hardware requirements.
Deployment Process
The deployment on Tomcat can be done either by copying the war file into web apps folder or by using Management portal.
Deployment from Web apps Folder
The instructions are same for all versions of Tomcat.
- Copy the war file to
/webapps
folder. - Tomcat will automatically detect the newly copied war file and start deploying. You can check the status on the Tomcat console.
- After the deployment is successful you can access the application at
http://localhost:8080/<ApplicationName>
.
Deployment using Management Portal
Deployment for Tomcat 8.x/9.x
- Open a browser and navigate to
http://localhost:8080
(if Tomcat is running on a different port, replace the 8080 with that port). - Click on Manager App button displayed on the homepage and provide User Name and Password in the respective text boxes when prompted.
- You will be navigated to Tomcat Web Application Manager.
- Navigate to War file to deploy section and choose the war file that you want to deploy and click on Deploy button.
- Once Application war has been deployed the application name will be listed in the applications list and it is in Start state by default.
- Click on the application name link to access the Deployed application.
Configure Tomcat to Turn off Compression
During the build process WaveMaker already generates compressed artifacts for static content. Tomcat's compression should be turned off in the server.xml
, otherwise the Tomcat server will compress the files again leading to errors when the deployed WaveMaker app is loaded in the browsers.
Here is how compression is turned off in server.xml
- Open
server.xml
for editing. - Locate the
Connector
tag that containscompression
attribute. - Remove the attributes
compression
,compressionMinSize
,compressableMimeType
from theConnector
tag. - Save the changes and restart the Tomcat server.