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
.warfile 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 usesjavax.*, migrate it before uploading. - If the application needs to respond at the main address (
https://yourdomain.com), name the fileROOT.war. With another name, for exampleapp.war, it will be located athttps://yourdomain.com/app. - If it uses a database, create it in cPanel under Databases → MySQL Databases, and configure the connection using the
localhostserver.
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.
- Go to the folder indicated by support. It is the Tomcat
webappsfolder, located insideea-podman.din the account's home directory. - Click Upload and upload the
.warfile. You can also upload it via FTP using the main account. - 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
logsfolder, next towebapps, using the File Manager. - To publish a new version, replace the
.warinwebapps. If you do not have automatic publication, request a restart via ticket.
Common issues
- I cannot find the
ea-podman.dfolder: Tomcat is not yet activated on your account. Request it via ticket. - I uploaded the
.warand the application folder is not created: automatic publication is not active. Request the deployment via ticket. ClassNotFoundExceptionerror withjavax.servletclasses: the application is for Tomcat 9 or earlier. Migrate it to Jakarta EE by changingjavax.*tojakarta.*.- 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.
