{"id":6321,"date":"2026-05-26T19:10:00","date_gmt":"2026-05-26T19:10:00","guid":{"rendered":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/?p=6321"},"modified":"2026-05-27T13:30:55","modified_gmt":"2026-05-27T13:30:55","slug":"how-to-deploy-apache-tomcat-applications-in-cwp-panel","status":"publish","type":"post","link":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/506\/deploy-tomcat-apps-in-cwp.html","title":{"rendered":"How to Deploy Apache Tomcat Applications in CWP Panel?"},"content":{"rendered":"\n<p>Running Java applications on your own server gives you more control, better performance, and flexibility for growing projects. If you are using Control Web Panel (CWP), deploying applications with Apache Tomcat becomes much easier when configured correctly.<\/p>\n\n\n\n<p><strong>By integrating Tomcat with CWP:<\/strong><\/p>\n\n\n\n<ul>\n  <li style=\"margin-left: 24px;\">You can host Java applications using your domain name<\/li>\n  <li style=\"margin-left: 24px;\">Manage applications more efficiently<\/li>\n  <li style=\"margin-left: 24px;\">Deploy .war files quickly<\/li>\n  <li style=\"margin-left: 24px;\">Configure proxy-based access easily<\/li>\n  <li style=\"margin-left: 24px;\">Monitor logs and troubleshoot deployment issues<\/li>\n<\/ul>\n\n\n\n<p>This guide explains the complete deployment process in a beginner-friendly way and helps you understand why each step is necessary.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>What You Need Before Starting<\/strong><\/h2>\n\n\n\n<p>Before deploying your Tomcat application, ensure you have:<\/p>\n\n\n\n<ul>\n  <li style=\"margin-left: 24px;\">A VPS or dedicated server with CWP installed<\/li>\n  <li style=\"margin-left: 24px;\">Root SSH access to the server<\/li>\n  <li style=\"margin-left: 24px;\">A registered domain name<\/li>\n  <li style=\"margin-left: 24px;\">Java is installed on the server<\/li>\n  <li style=\"margin-left: 24px;\">Your Java application (.war file or project folder)<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Why Apache Tomcat Deployment Matters?<\/strong><\/h2>\n\n\n\n<p>Deploying applications properly is important because incorrect configuration can cause:<\/p>\n\n\n\n<ul>\n  <li style=\"margin-left: 24px;\">Website not loading<\/li>\n  <li style=\"margin-left: 24px;\">Tomcat service errors<\/li>\n  <li style=\"margin-left: 24px;\">Port conflicts<\/li>\n  <li style=\"margin-left: 24px;\">404 application errors<\/li>\n  <li style=\"margin-left: 24px;\">Java deployment failures<\/li>\n  <li style=\"margin-left: 24px;\">Reverse proxy issues<\/li>\n  <li style=\"margin-left: 24px;\">Slow application performance<\/li>\n<\/ul>\n\n\n\n<p>With proper deployment, it ensures your application runs smoothly and is accessible through your domain.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Process to Deploy Apache Tomcat Applications in CWP Panel<\/strong><\/h2>\n\n\n\n<p style=\"margin-left: 24px;\">\n  <strong style=\"font-size:18px;\">\u27a2 Step 1: Add Domain in CWP<\/strong>\n<\/p>\n\n\n\n<p>The first step is to add your domain to the CWP panel, as CWP needs to know which domain will be connected to the Tomcat application. Without adding the domain, Apache and Tomcat cannot route traffic properly.<\/p>\n\n\n\n<p><strong>Steps to follow<\/strong><\/p>\n\n\n\n<p style=\"margin-left:24px;\"><strong>\u2794<\/strong> Log in to your CWP Panel.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"280\" height=\"273\" src=\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-content\/uploads\/2026\/05\/image6-4.png\" alt=\"cpanel-login\" class=\"wp-image-6337\"\/><\/figure>\n<\/div>\n\n\n<p style=\"margin-left:24px;\"><strong>\u2794<\/strong> Navigate to the domain management section.<\/p>\n<p style=\"margin-left:24px;\"><strong>\u2794<\/strong> Add your domain under the appropriate user account.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"727\" height=\"328\" src=\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-content\/uploads\/2026\/05\/image7-4.png\" alt=\"add-a-new-domain\" class=\"wp-image-6342\" srcset=\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-content\/uploads\/2026\/05\/image7-4.png 727w, https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-content\/uploads\/2026\/05\/image7-4-300x135.png 300w\" sizes=\"auto, (max-width: 727px) 100vw, 727px\" \/><\/figure>\n<\/div>\n\n\n<p>Once added successfully, the domain becomes available for web server configuration!<\/p>\n\n\n\n<div style=\"border: 1px solid #faf4ff; padding: 18px 24px; background-color: #faf4ff; width: 730px;\">\n  <p style=\"margin: 0 0 10px 0;\">\n    <strong>\u2605 Small Tip:<\/strong>\n  <\/p>\n\n  <p style=\"margin: 0 0 10px 0;\">\n    Use a dedicated domain or subdomain for Java applications.\n  <\/p>\n\n  <p style=\"margin: 0 0 10px 0;\">\n    For example:\n  <\/p>\n\n  <ul style=\"margin: 0 0 10px 24px; padding-left: 18px;\">\n    <li>app.yourdomain.com<\/li>\n    <li>portal.yourdomain.com<\/li>\n  <\/ul>\n\n  <p style=\"margin: 0;\">\n    This keeps your application structure cleaner and easier to manage!\n  <\/p>\n<\/div>\n\n\n\n<p style=\"margin-top: 16px; margin-left: 24px;\">\n  <strong style=\"font-size:18px;\">\u27a2 Step 2: Install Apache Tomcat<\/strong>\n<\/p>\n\n\n\n<p>Now you need to install the Tomcat service from CWP!<\/p>\n\n\n\n<p><strong>Steps to follow<\/strong><\/p>\n\n\n\n<p style=\"margin-left:24px;\"><strong>\u2794<\/strong> In CWP, go to <strong>\u2018Tomcat Manager.\u2019<\/strong><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"478\" height=\"252\" src=\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-content\/uploads\/2026\/05\/image5-4.png\" alt=\"install-tomcat-server&amp;manager\" class=\"wp-image-6351\" srcset=\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-content\/uploads\/2026\/05\/image5-4.png 478w, https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-content\/uploads\/2026\/05\/image5-4-300x158.png 300w\" sizes=\"auto, (max-width: 478px) 100vw, 478px\" \/><\/figure>\n<\/div>\n\n\n<p style=\"margin-left:24px;\"><strong>\u2794<\/strong> Select the appropriate version &#038; install Apache Tomcat.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"417\" height=\"236\" src=\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-content\/uploads\/2026\/05\/image4-4.png\" alt=\"select-version-to-install\" class=\"wp-image-6354\" srcset=\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-content\/uploads\/2026\/05\/image4-4.png 417w, https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-content\/uploads\/2026\/05\/image4-4-300x170.png 300w\" sizes=\"auto, (max-width: 417px) 100vw, 417px\" \/><\/figure>\n<\/div>\n\n\n<p style=\"margin-left: 24px; text-indent: -24px; padding-left: 18px;\">\n  <strong>\u2794<\/strong> Once installation is complete, verify access using:<br>\n  <strong>https:\/\/&lt;SERVER_IP&gt;:8080<\/strong>\n<\/p>\n\n\n\n<p>If the Tomcat page opens successfully, it means the service is running correctly!<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"796\" height=\"235\" src=\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-content\/uploads\/2026\/05\/image3-4.png\" alt=\"tomcat-page\" class=\"wp-image-6365\" srcset=\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-content\/uploads\/2026\/05\/image3-4.png 796w, https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-content\/uploads\/2026\/05\/image3-4-300x89.png 300w, https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-content\/uploads\/2026\/05\/image3-4-768x227.png 768w\" sizes=\"auto, (max-width: 796px) 100vw, 796px\" \/><\/figure>\n<\/div>\n\n\n<div style=\"border: 1px solid #faf4ff; padding: 18px 24px; background-color: #faf4ff; width: 730px;\">\n  <p style=\"margin: 0 0 10px 0;\">\n    <strong>What Does Port 8080 Mean?<\/strong>\n  <\/p>\n\n  <p style=\"margin: 0 0 10px 0;\">\n    By default, Tomcat runs on Port 8080 instead of the standard HTTP port 80.\n  <\/p>\n\n  <p style=\"margin: 0;\">\n    Later, Apache will act as a reverse proxy, allowing visitors to access your application directly via your domain name without typing: 8080.\n  <\/p>\n<\/div>\n\n\n\n<p style=\"margin-top: 16px; margin-left: 24px;\">\n  <strong style=\"font-size:18px;\">\u27a2 Step 3: Configure Domain to Use Tomcat<\/strong>\n<\/p>\n\n\n\n<p>After installing Tomcat, you must connect your domain with the Tomcat service.<\/p>\n\n\n\n<p><strong>Steps to Follow<\/strong><\/p>\n\n\n\n<ul style=\"list-style: none; margin-left: 24px; padding-left: 0;\">\n  <li>\u2794 Open \u2018WebServers Domain Conf\u2019 in CWP.<\/li>\n  <li>\u2794 Select the user associated with your domain.<\/li>\n  <li>\u2794 Click <strong>\u2018Create Configuration.\u2019<\/strong><\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"567\" height=\"243\" src=\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-content\/uploads\/2026\/05\/image1-4.png\" alt=\"create-configuration\" class=\"wp-image-6372\" srcset=\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-content\/uploads\/2026\/05\/image1-4.png 567w, https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-content\/uploads\/2026\/05\/image1-4-300x129.png 300w\" sizes=\"auto, (max-width: 567px) 100vw, 567px\" \/><\/figure>\n<\/div>\n\n\n<p><strong>Configure the following:\u00a0<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Setting<\/strong><\/td><td><strong>Value<\/strong><\/td><\/tr><tr><td>Web Server<\/td><td>Apache \u2192 Proxy \u2192 Custom Port<\/td><\/tr><tr><td>Port<\/td><td>8080<\/td><\/tr><tr><td>Rebuild Webserver Conf on Save<\/td><td>Enabled<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"688\" height=\"288\" src=\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-content\/uploads\/2026\/05\/image2-4.png\" alt=\"save-changes\" class=\"wp-image-6379\" style=\"aspect-ratio:2.388964245021974;width:688px;height:auto\" srcset=\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-content\/uploads\/2026\/05\/image2-4.png 688w, https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-content\/uploads\/2026\/05\/image2-4-300x126.png 300w\" sizes=\"auto, (max-width: 688px) 100vw, 688px\" \/><\/figure>\n<\/div>\n\n\n<p style=\"margin-left:24px;\"><strong>\u2794<\/strong> Save the configuration.<\/p>\n\n\n\n<p><strong>What This Configuration Does<\/strong><\/p>\n\n\n\n<p style=\"margin-left:24px;\"><strong>\u2794<\/strong> This setup creates a reverse proxy connection:<\/p>\n\n\n\n<p><strong>Visitor \u2192 Apache \u2192 Tomcat \u2192 Application<\/strong><\/p>\n\n\n\n<p><strong>This will help to:<\/strong><\/p>\n\n\n\n<ul>\n  <li style=\"margin-left: 24px;\">Improve security<\/li>\n  <li style=\"margin-left: 24px;\">Hide Tomcat ports<\/li>\n  <li style=\"margin-left: 24px;\">Use normal domain access<\/li>\n  <li style=\"margin-left: 24px;\">Handle SSL certificates more easily<\/li>\n<\/ul>\n<div style=\"border: 1px solid #faf4ff; padding: 18px 24px; background-color: #faf4ff; width: 730px;\">\n  <p style=\"margin: 0 0 10px 0;\">\n    <strong>\u2605 Pro Tip:<\/strong>\n  <\/p>\n\n  <p style=\"margin: 0 0 10px 0;\">\n    <strong>Always enable:<\/strong>\n  <\/p>\n\n  <p style=\"margin: 0 0 10px 0;\">\n    <strong>Rebuild webserver conf on save<\/strong>\n  <\/p>\n\n  <p style=\"margin: 0;\">\n    This ensures Apache automatically updates its configuration files correctly.\n  <\/p>\n<\/div>\n\n\n\n<p style=\"margin-top: 16px; margin-left: 24px;\">\n  <strong style=\"font-size:18px;\">\u27a2 Step 4: Deploy Application Files<\/strong>\n<\/p>\n\n\n\n<p>Now it\u2019s time to upload your Java application!<\/p>\n\n\n\n<p style=\"margin-left:24px;\"><strong>\u2794<\/strong> Access your server using SSH.<\/p>\n<p style=\"margin-left:24px;\"><strong>\u2794<\/strong> Navigate to the Tomcat Directory using the command below:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><button class=\"copy-btn\" onclick=\"copyCommand(this)\">\ud83d\udccb<\/button><span class=\"copy-msg\">Copied!<\/span>\n    <table class=\"has-fixed-layout\">\n        <tbody>\n            <tr>\n                <td class=\"kb_firewall\"><strong><strong>cd \/usr\/local\/tomcat\/tomcat9\/<\/strong><\/strong><\/td>\n            <\/tr>\n        <\/tbody>\n    <\/table>\n<\/figure>\n\n\n\n<p style=\"margin-left:24px;\">\n  <strong>\u2794<\/strong> Place your <strong>.war<\/strong> file OR extracted project folder inside:\n<\/p>\n\n\n\n<figure class=\"wp-block-table\"><button class=\"copy-btn\" onclick=\"copyCommand(this)\">\ud83d\udccb<\/button><span class=\"copy-msg\">Copied!<\/span>\n    <table class=\"has-fixed-layout\">\n        <tbody>\n            <tr>\n                <td class=\"kb_firewall\"><strong><strong>webapps\/<\/strong><\/strong><\/td>\n            <\/tr>\n        <\/tbody>\n    <\/table>\n<\/figure>\n\n\n\n<p>You can also use the user&#8217;s <strong>public_html<\/strong> directory if required!<\/p>\n\n\n\n<p><strong>Difference Between WAR File &amp; Extracted Folder<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Type<\/strong><\/td><td><strong>Meaning<\/strong><\/td><\/tr><tr><td><strong>.war<\/strong> file<\/td><td>Compressed Java web application package<\/td><\/tr><tr><td>Extracted Folder<\/td><td>Already unpacked application files<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Tomcat can automatically extract <strong>.war<\/strong> files during startup.<\/p>\n\n\n\n<div style=\"border: 1px solid #faf4ff; padding: 18px 24px; background-color: #faf4ff; width: 730px;\">\n  <p style=\"margin: 0 0 10px 0;\">\n    <strong>\u2605 Small Tip:<\/strong>\n  <\/p>\n\n  <p style=\"margin: 0 0 10px 0;\">\n    Keep application names short and simple.\n  <\/p>\n\n  <p style=\"margin: 0 0 10px 0;\">\n    Example: <strong>myapp.war<\/strong>\n  <\/p>\n\n  <p style=\"margin: 0 0 10px 0;\">\n    Avoid: <strong>my-final-production-app-v2.war<\/strong>\n  <\/p>\n\n  <p style=\"margin: 0;\">\n    This is because simple names reduce deployment confusion.\n  <\/p>\n<\/div>\n\n\n\n<p style=\"margin-top: 16px; margin-left: 24px;\">\n  <strong style=\"font-size:18px;\">\u27a2 Step 5: Configure Virtual Host in Tomcat<\/strong>\n<\/p>\n\n\n\n<p>Next, it\u2019s time to configure Tomcat to recognize your domain. As Tomcat needs to know:<\/p>\n\n\n\n<ul>\n  <li style=\"margin-left: 24px;\">Which domain belongs to which application<\/li>\n  <li style=\"margin-left: 24px;\">Where application files are located<\/li>\n  <li style=\"margin-left: 24px;\">How requests should be processed<\/li>\n<\/ul>\n<p style=\"margin-left:24px;\"><strong>\u2794<\/strong> For this, open the configuration file<\/p>\n\n\n\n<figure class=\"wp-block-table\"><button class=\"copy-btn\" onclick=\"copyCommand(this)\">\ud83d\udccb<\/button><span class=\"copy-msg\">Copied!<\/span>\n    <table class=\"has-fixed-layout\">\n        <tbody>\n            <tr>\n                <td class=\"kb_firewall\"><strong><strong>\/usr\/local\/tomcat\/tomcat9\/conf\/server.xml<\/strong><\/strong><\/td>\n            <\/tr>\n        <\/tbody>\n    <\/table>\n<\/figure>\n<p style=\"margin-left:24px;\"><strong>\u2794<\/strong> Add or Modify the Host Entry<\/p>\n\n\n\n<figure class=\"wp-block-table\">\n    <button class=\"copy-btn\" onclick=\"copyCommand(this)\">\ud83d\udccb<\/button>\n    <span class=\"copy-msg\">Copied!<\/span>\n\n    <table class=\"has-fixed-layout\">\n        <tbody>\n            <tr>\n                <td class=\"kb_firewall\">\n<pre style=\"color: #fff; margin: 0;\"><code style=\"color: #fff;\">&lt;Host name=\"yourdomain.com\" <br> appBase=\"\/usr\/local\/tomcat\/tomcat9\/webapps\/\"&gt;\n    &lt;Alias&gt;www.yourdomain.com&lt;\/Alias&gt;\n    &lt;Context path=\"\" unpackWARs=\"true\" autoDeploy=\"true\" <br>reloadable=\"true\" docBase=\"\" debug=\"1\"\/&gt;\n&lt;\/Host&gt;<\/code><\/pre>\n                <\/td>\n            <\/tr>\n        <\/tbody>\n    <\/table>\n<\/figure>\n\n\n\n<p><strong>Replace the Following Values<\/strong><\/p>\n\n\n\n<ul>\n  <li style=\"margin-left: 24px;\"><strong>yourdomain.com<\/strong> with your actual domain<\/li>\n  <li style=\"margin-left: 24px;\"><strong>appBase<\/strong> with your application path<\/li>\n<\/ul>\n\n\n\n<p><strong>Understanding Important Parameters<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Parameter<\/strong><\/td><td><strong>Purpose<\/strong><\/td><\/tr><tr><td><strong>autoDeploy=&#8221;true&#8221;<\/strong><\/td><td>Automatically deploys applications<\/td><\/tr><tr><td><strong>reloadable=&#8221;true&#8221;<\/strong><\/td><td>Reloads application changes automatically<\/td><\/tr><tr><td><strong>unpackWARs=&#8221;true&#8221;<\/strong><\/td><td>Extracts WAR files automatically<\/td><\/tr><tr><td><strong>Alias<\/strong><\/td><td>Allows the WWW version of the domain<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<div style=\"border: 1px solid #faf4ff; padding: 18px 24px; background-color: #faf4ff; width: 730px;\">\n  <p style=\"margin: 0 0 10px 0;\">\n    <strong>\u2605 Small Tip:<\/strong>\n  <\/p>\n\n  <p style=\"margin: 0 0 10px 0;\">\n    Before editing <strong>server.xml<\/strong>, always create a backup:\n  <\/p>\n\n  <p style=\"margin: 0 0 10px 0;\">\n    <strong>cp server.xml server.xml.backup<\/strong>\n  <\/p>\n\n  <p style=\"margin: 0;\">\n    This helps restore the original configuration if something goes wrong.\n  <\/p>\n<\/div>\n\n\n\n<p style=\"margin-top: 16px; margin-left: 24px;\">\n  <strong style=\"font-size:18px;\">\u27a2 Step 6: Restart Tomcat Service<\/strong>\n<\/p>\n\n\n\n<p>After configuration changes, you have to restart Tomcat.<\/p>\n\n\n\n<p style=\"margin-left:24px;\"><strong>\u2794<\/strong> Firstly, you have to stop Tomcat<\/p>\n\n\n\n<figure class=\"wp-block-table\"><button class=\"copy-btn\" onclick=\"copyCommand(this)\">\ud83d\udccb<\/button><span class=\"copy-msg\">Copied!<\/span>\n    <table class=\"has-fixed-layout\">\n        <tbody>\n            <tr>\n                <td class=\"kb_firewall\"><strong><strong>sh \/usr\/local\/tomcat\/tomcat9\/bin\/shutdown.sh<\/strong><\/strong><\/td>\n            <\/tr>\n        <\/tbody>\n    <\/table>\n<\/figure>\n\n\n\n<p style=\"margin-left:24px;\"><strong>\u2794<\/strong> Now, you have to monitor the logs<\/p>\n\n\n\n<figure class=\"wp-block-table\"><button class=\"copy-btn\" onclick=\"copyCommand(this)\">\ud83d\udccb<\/button><span class=\"copy-msg\">Copied!<\/span>\n    <table class=\"has-fixed-layout\">\n        <tbody>\n            <tr>\n                <td class=\"kb_firewall\"><strong><strong>tail -f \/usr\/local\/tomcat\/tomcat9\/logs\/catalina.out<\/strong><\/strong><\/td>\n            <\/tr>\n        <\/tbody>\n    <\/table>\n<\/figure>\n\n\n\n<p style=\"margin-left:24px;\"><strong>\u2794<\/strong> Now, verify whether Tomcat is stopped. Use any of the commands:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><button class=\"copy-btn\" onclick=\"copyCommand(this)\">\ud83d\udccb<\/button><span class=\"copy-msg\">Copied!<\/span>\n    <table class=\"has-fixed-layout\">\n        <tbody>\n            <tr>\n                <td class=\"kb_firewall\"><strong><strong>netstat -tulpn | grep java<\/strong><\/strong><\/td>\n            <\/tr>\n        <\/tbody>\n    <\/table>\n<\/figure>\n<p style=\"margin-left:280px;\"><strong>OR<\/strong><\/p>\n<figure class=\"wp-block-table\"><button class=\"copy-btn\" onclick=\"copyCommand(this)\">\ud83d\udccb<\/button><span class=\"copy-msg\">Copied!<\/span>\n    <table class=\"has-fixed-layout\">\n        <tbody>\n            <tr>\n                <td class=\"kb_firewall\"><strong><strong>ss -tulpn | grep java<\/strong><\/strong><\/td>\n            <\/tr>\n        <\/tbody>\n    <\/table>\n<\/figure>\n\n\n\n<p>If no Java process appears, Tomcat has stopped successfully!<\/p>\n\n\n\n<p style=\"margin-left:24px;\"><strong>\u2794<\/strong> Now, you have to start Tomcat<\/p>\n\n\n\n<figure class=\"wp-block-table\"><button class=\"copy-btn\" onclick=\"copyCommand(this)\">\ud83d\udccb<\/button><span class=\"copy-msg\">Copied!<\/span>\n    <table class=\"has-fixed-layout\">\n        <tbody>\n            <tr>\n                <td class=\"kb_firewall\"><strong><strong>sh \/usr\/local\/tomcat\/tomcat9\/bin\/startup.sh<\/strong><\/strong><\/td>\n            <\/tr>\n        <\/tbody>\n    <\/table>\n<\/figure>\n\n\n\n<p style=\"margin-left:24px;\"><strong>\u2794<\/strong> Don\u2019t forget to monitor logs again<\/p>\n\n\n\n<figure class=\"wp-block-table\"><button class=\"copy-btn\" onclick=\"copyCommand(this)\">\ud83d\udccb<\/button><span class=\"copy-msg\">Copied!<\/span>\n    <table class=\"has-fixed-layout\">\n        <tbody>\n            <tr>\n                <td class=\"kb_firewall\"><strong><strong>tail -f \/usr\/local\/tomcat\/tomcat9\/logs\/catalina.out<\/strong><\/strong><\/td>\n            <\/tr>\n        <\/tbody>\n    <\/table>\n<\/figure>\n\n\n\n<p><strong>So, what actually happens during startup?<\/strong><\/p>\n\n\n\n<ul>\n  <li style=\"margin-left: 24px;\">.war files get extracted automatically<\/li>\n  <li style=\"margin-left: 24px;\">Application deployment begins<\/li>\n  <li style=\"margin-left: 24px;\">Tomcat loads Java classes<\/li>\n  <li style=\"margin-left: 24px;\">Errors appear directly in logs<\/li>\n  <li style=\"margin-left: 24px;\">Application context gets initialized<\/li>\n<\/ul>\n\n\n\n<p>This log monitoring is extremely useful for troubleshooting deployment issues!<\/p>\n\n\n\n<p style=\"margin-left: 24px;\">\n  <strong style=\"font-size:18px;\">\u27a2 Step 7: Final Verification<\/strong>\n<\/p>\n\n\n\n<p>Once Tomcat starts successfully, test your application!<\/p>\n\n\n\n<p><strong>If everything is configured correctly:<\/strong><\/p>\n\n\n\n<ul>\n  <li style=\"margin-left: 24px;\">Your Java application should load<\/li>\n  <li style=\"margin-left: 24px;\">The domain should work without a port number<\/li>\n  <li style=\"margin-left: 24px;\">Application pages should open normally<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Common Deployment Errors &amp; Fixes<\/strong><\/h2>\n\n\n\n<p>\n  <strong style=\"font-size:18px;\">1. Application Shows 404 Error<\/strong>\n<\/p>\n\n\n\n<p><strong>Possible Causes<\/strong><\/p>\n\n\n\n<ul>\n  <li style=\"margin-left: 24px;\">Wrong application path<\/li>\n  <li style=\"margin-left: 24px;\">Incorrect appBase<\/li>\n  <li style=\"margin-left: 24px;\">WAR file not extracted<\/li>\n<\/ul>\n\n\n\n<p><strong>Solution<\/strong><\/p>\n\n\n\n<p style=\"margin-left:24px;\"><strong>\u2794<\/strong> You have to check:<\/p>\n<figure class=\"wp-block-table\"><button class=\"copy-btn\" onclick=\"copyCommand(this)\">\ud83d\udccb<\/button><span class=\"copy-msg\">Copied!<\/span>\n    <table class=\"has-fixed-layout\">\n        <tbody>\n            <tr>\n                <td class=\"kb_firewall\"><strong><strong>\/usr\/local\/tomcat\/tomcat9\/webapps\/<\/strong><\/strong><\/td>\n            <\/tr>\n        <\/tbody>\n    <\/table>\n<\/figure>\n\n\n\n<p>\n  <strong style=\"font-size:18px;\">2. Domain Opens Default Apache Page<\/strong>\n<\/p>\n\n\n\n<p><strong>Cause<\/strong><\/p>\n\n\n\n<p style=\"margin-left:24px;\"><strong>\u2794<\/strong> Apache proxy configuration was not applied properly.<\/p>\n\n\n\n<p><strong>Solution<\/strong><\/p>\n\n\n\n<p style=\"margin-left:24px;\"><strong>\u2794<\/strong> Rebuild the Apache configuration in CWP, then restart Apache.<\/p>\n\n\n\n<p>\n  <strong style=\"font-size:18px;\">3. Tomcat Fails to Start<\/strong>\n<\/p>\n\n\n\n<p><strong>Cause<\/strong><\/p>\n\n\n\n<p style=\"margin-left:24px;\"><strong>\u2794<\/strong> Syntax error in <strong>server.xml<\/strong><\/p>\n\n\n\n<p><strong>Solution<\/strong><\/p>\n\n\n\n<p style=\"margin-left:24px;\"><strong>\u2794<\/strong> Review XML formatting carefully.<\/p>\n\n\n\n<p>Even a missing bracket can stop Tomcat from starting.<\/p>\n\n\n\n<p>\n  <strong style=\"font-size:18px;\">4. Port 8080 Already in Use<\/strong>\n<\/p>\n\n\n\n<p><strong>Cause<\/strong><\/p>\n\n\n\n<p style=\"margin-left:24px;\"><strong>\u2794<\/strong> Another service is using the same port.<\/p>\n\n\n\n<p><strong>Solution<\/strong><\/p>\n\n\n\n<p style=\"margin-left:24px;\"><strong>\u2794<\/strong> Stop the conflicting service or change the Tomcat port.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Conclusion<\/strong><\/h2>\n\n\n\n<p>Deploying Apache Tomcat applications in CWP Panel may look technical initially, but once configured properly, the process becomes smooth and manageable.<\/p>\n\n\n\n<p>By<strong> <\/strong>correctly installing Tomcat, configuring Apache proxy settings, deploying application files, setting up virtual hosts, and monitoring logs, you can run Java applications efficiently using your own domain name.<\/p>\n\n\n\n<p>The best part about using CWP with Tomcat is that it combines the power of Linux server management with a user-friendly interface, making Java application hosting much easier even for beginners.<\/p>\n\n\n\n<p>With proper deployment practices and regular monitoring, your Tomcat applications can run securely, efficiently, and reliably over the long term.<\/p>\n\n\n\n<script>\nfunction copyCommand(btn) {\n  const td = btn.parentElement.querySelector(\"td.kb_firewall\");\n  const text = td.innerText.trim();\n\n  navigator.clipboard.writeText(text).then(() => {\n    const msg = btn.parentElement.querySelector(\".copy-msg\");\n    msg.style.display = \"inline-block\";\n    setTimeout(() => msg.style.display = \"none\", 1000);\n  });\n}\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>Running Java applications on your own server gives you more control, better performance, and flexibility for growing projects. If you are using Control Web Panel (CWP), deploying applications with Apache Tomcat becomes much easier when configured correctly. By integrating Tomcat with CWP: You can host Java applications using your domain name Manage applications more efficiently [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[44],"tags":[],"class_list":["post-6321","post","type-post","status-publish","format-standard","hentry","category-cwp"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Deploy Apache Tomcat Applications in CWP Panel?<\/title>\n<meta name=\"description\" content=\"Learn how to deploy Apache Tomcat applications in CWP Panel with this guide to easily host Java web apps, configure Tomcat, and manage deployments efficiently.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/506\/deploy-tomcat-apps-in-cwp.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Deploy Apache Tomcat Applications in CWP Panel?\" \/>\n<meta property=\"og:description\" content=\"Learn how to deploy Apache Tomcat applications in CWP Panel with this guide to easily host Java web apps, configure Tomcat, and manage deployments efficiently.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/506\/deploy-tomcat-apps-in-cwp.html\" \/>\n<meta property=\"og:site_name\" content=\"Host IT Smart Knowledge base\" \/>\n<meta property=\"article:published_time\" content=\"2026-05-26T19:10:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-05-27T13:30:55+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-content\/uploads\/2026\/05\/image6-4.png\" \/>\n\t<meta property=\"og:image:width\" content=\"280\" \/>\n\t<meta property=\"og:image:height\" content=\"273\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/506\/deploy-tomcat-apps-in-cwp.html\",\"url\":\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/506\/deploy-tomcat-apps-in-cwp.html\",\"name\":\"How to Deploy Apache Tomcat Applications in CWP Panel?\",\"isPartOf\":{\"@id\":\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/506\/deploy-tomcat-apps-in-cwp.html#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/506\/deploy-tomcat-apps-in-cwp.html#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-content\/uploads\/2026\/05\/image6-4.png\",\"datePublished\":\"2026-05-26T19:10:00+00:00\",\"dateModified\":\"2026-05-27T13:30:55+00:00\",\"author\":{\"@id\":\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/#\/schema\/person\/317c14a877385667f19d3b7496bd5108\"},\"description\":\"Learn how to deploy Apache Tomcat applications in CWP Panel with this guide to easily host Java web apps, configure Tomcat, and manage deployments efficiently.\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/506\/deploy-tomcat-apps-in-cwp.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/506\/deploy-tomcat-apps-in-cwp.html#primaryimage\",\"url\":\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-content\/uploads\/2026\/05\/image6-4.png\",\"contentUrl\":\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-content\/uploads\/2026\/05\/image6-4.png\",\"width\":280,\"height\":273},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/#website\",\"url\":\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/\",\"name\":\"Host IT Smart Knowledge base\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/#\/schema\/person\/317c14a877385667f19d3b7496bd5108\",\"name\":\"Admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d4827c56a6721070dde339640d47ff44ba0d0e515c7e577cf29305ab72383fe3?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d4827c56a6721070dde339640d47ff44ba0d0e515c7e577cf29305ab72383fe3?s=96&d=mm&r=g\",\"caption\":\"Admin\"},\"sameAs\":[\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/\"],\"url\":\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Deploy Apache Tomcat Applications in CWP Panel?","description":"Learn how to deploy Apache Tomcat applications in CWP Panel with this guide to easily host Java web apps, configure Tomcat, and manage deployments efficiently.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/506\/deploy-tomcat-apps-in-cwp.html","og_locale":"en_US","og_type":"article","og_title":"How to Deploy Apache Tomcat Applications in CWP Panel?","og_description":"Learn how to deploy Apache Tomcat applications in CWP Panel with this guide to easily host Java web apps, configure Tomcat, and manage deployments efficiently.","og_url":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/506\/deploy-tomcat-apps-in-cwp.html","og_site_name":"Host IT Smart Knowledge base","article_published_time":"2026-05-26T19:10:00+00:00","article_modified_time":"2026-05-27T13:30:55+00:00","og_image":[{"width":280,"height":273,"url":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-content\/uploads\/2026\/05\/image6-4.png","type":"image\/png"}],"author":"Admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Admin","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/506\/deploy-tomcat-apps-in-cwp.html","url":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/506\/deploy-tomcat-apps-in-cwp.html","name":"How to Deploy Apache Tomcat Applications in CWP Panel?","isPartOf":{"@id":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/506\/deploy-tomcat-apps-in-cwp.html#primaryimage"},"image":{"@id":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/506\/deploy-tomcat-apps-in-cwp.html#primaryimage"},"thumbnailUrl":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-content\/uploads\/2026\/05\/image6-4.png","datePublished":"2026-05-26T19:10:00+00:00","dateModified":"2026-05-27T13:30:55+00:00","author":{"@id":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/#\/schema\/person\/317c14a877385667f19d3b7496bd5108"},"description":"Learn how to deploy Apache Tomcat applications in CWP Panel with this guide to easily host Java web apps, configure Tomcat, and manage deployments efficiently.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/506\/deploy-tomcat-apps-in-cwp.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/506\/deploy-tomcat-apps-in-cwp.html#primaryimage","url":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-content\/uploads\/2026\/05\/image6-4.png","contentUrl":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-content\/uploads\/2026\/05\/image6-4.png","width":280,"height":273},{"@type":"WebSite","@id":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/#website","url":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/","name":"Host IT Smart Knowledge base","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/#\/schema\/person\/317c14a877385667f19d3b7496bd5108","name":"Admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d4827c56a6721070dde339640d47ff44ba0d0e515c7e577cf29305ab72383fe3?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d4827c56a6721070dde339640d47ff44ba0d0e515c7e577cf29305ab72383fe3?s=96&d=mm&r=g","caption":"Admin"},"sameAs":["https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/"],"url":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/posts\/6321","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/comments?post=6321"}],"version-history":[{"count":171,"href":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/posts\/6321\/revisions"}],"predecessor-version":[{"id":6591,"href":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/posts\/6321\/revisions\/6591"}],"wp:attachment":[{"href":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/media?parent=6321"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/categories?post=6321"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/tags?post=6321"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}