Deploying applications in Tomcat

This document contains information for deploying Java applications on Apache Tomcat in a managed hosting service with cPanel: what you need to prepare, how to upload the application, and what tasks support performs.

Apache Tomcat is the server that runs Java web applications (.war files, JSPs, and servlets). In hosting with cPanel, Tomcat runs in an isolated environment within your account that support activates and manages. You prepare the application and upload it from cPanel.

Who does what?

  • You: package the application, upload it to the specified folder, and verify that it works.
  • Support: activates Tomcat on your account, connects it to your domain, and restarts it when necessary.

Important: Tomcat is not available on all services, and Java applications consume significant memory. Before starting, consult the sales department, through the client portal or the online chat, whether your service includes it or if you should upgrade.

1. Preparing the application

  • Package it as a .war file using Maven, Gradle, or Ant from your computer.
  • The server uses Tomcat 10.1, which works with Jakarta EE (jakarta.* packages). If your application was built for Tomcat 9 or earlier and uses javax.*, migrate it before uploading.
  • If the application needs to respond at the main address (https://yourdomain.com), name the file ROOT.war. With another name, for example app.war, it will be located at https://yourdomain.com/app.
  • If it uses a database, create it in cPanel under Databases → MySQL Databases, and configure the connection using the localhost server.

2. Requesting Tomcat activation

Open a ticket from the client portal requesting the activation of Tomcat. Indicate:

  • The domain or subdomain where the application will run.
  • The path: the root (/) or a folder, such as /app.
  • Whether you want new versions to be published automatically upon upload.

When ready, support will indicate the folder where you need to upload the application.

3. Uploading the application

Access: log in to cPanel from the client portal → Log in to cPanel, or at https://yourdomain.com/cpanel. Then open Files → File Manager.

  1. Go to the folder indicated by support. It is the Tomcat webapps folder, located inside ea-podman.d in the account's home directory.
  2. Click Upload and upload the .war file. You can also upload it via FTP using the main account.
  3. If automatic publication is activated, Tomcat deploys the application within a few minutes and creates a folder with its name, for example ROOT. If not, reply to the ticket so support can publish it.

Important: do not upload the application to public_html: Tomcat only reads its own webapps folder. Do not modify the files in the conf folder either: changes there can stop Tomcat.

4. Verifying and updating

  • Go to the application's address from your browser and test its main functions.
  • If something fails, check the logs in the Tomcat logs folder, next to webapps, using the File Manager.
  • To publish a new version, replace the .war in webapps. If you do not have automatic publication, request a restart via ticket.

Common issues

  • I cannot find the ea-podman.d folder: Tomcat is not yet activated on your account. Request it via ticket.
  • I uploaded the .war and the application folder is not created: automatic publication is not active. Request the deployment via ticket.
  • ClassNotFoundException error with javax.servlet classes: the application is for Tomcat 9 or earlier. Migrate it to Jakarta EE by changing javax.* to jakarta.*.
  • The application works but the domain shows another page: the domain needs to be connected to Tomcat. Notify via ticket.
  • The application stops or runs slowly: it does not have enough memory. You can upgrade your service by consulting the sales department.

More information on how to package applications can be found in the official Tomcat documentation. If you need help with deployment, open a ticket from the client portal or inquire via the site's online chat.

  • tomcat, deploy
  • 14 Users Found This Useful
Was this answer helpful?

Related Articles

How to send information from forms - FormMail

This article explains how to send form data to an email on your domain using FormMail Clone, the...

PHP Scripts - Activating PHP support for the service.

This document contains information on how to choose or change the PHP version for each domain...

I cannot view the images on my cPanel services subdomain

This document contains information to resolve the issue of images not displaying on a subdomain...

DomainKeys and SPF - Prevent identity spoofing.

This document contains information to protect your domain against identity spoofing, configuring...

DomainKeys for sending email

This document contains information to verify and activate DKIM, SPF, and DMARC on your domain...