Satış ve Destek +90 (216) 521 78 00

Sepetim Giriş Yap | Kayıt Ol
Tenik Data
Tomcat Installation and configuration on cpanel - TeknikDATA Hosting Hizmetleri

Bilgi Merkezi

Ana sayfa > Bilgi Merkezi > English > cPanel > cPanel > Tomcat Installation and configuration on cpanel

Tomcat Installation and configuration on cpanel

Apache Tomcat (also known as Tomcat) is an open-source implementation of Java Servlets and JavaServer pages. Tomcat uses a self-contained HTTP server to provide support for Java web applications.


How to install Tomcat on cpanel

Use this Tomcat installation and configuration on cpanel. Click the checkbox for Tomcat at the Short Options List stage of EasyApache within WHM.

To install Tomcat, select the Tomcat option in WHM’s EasyApache (Apache Update) or using “/scripts/easyapache” (without the quotes) in command line. The Tomcat selection is found in Short Options List area.

Once installation completed. You can enable for account via WHM-> Account Functions->Install Servlets. Select the account in the Account Selection table and click the Install button.


/scripts/addservlets –

To disable

/scripts/remservelets –

Subdomain servlet support

You would need to use command line for adding subdomain support for servlets as they do not automatically include that support and WHM does not have any option to add servlets to subdomains.

Addon domain servlet support

Addon domains will not work when added using command line if added by the addon domain name. The /usr/local/apache/conf/httpd.conf ServerName line is what is used and it must match the Host name=”” line in /usr/local/jakarta/conf/server.xml file exactly, so addon domain support is added by installing servlets onto the subdomain associated with the addon domain:


/usr/local/cpanel/scripts/addservlets2 –

Manually check the setting for the domain. Open up the Apache conf /usr/local/apache/conf/httpd.conf

make sure tomcat module load

LoadModule jk_module /usr/local/apache/modules/
Include “/usr/local/apache/conf/jk.conf”

check if the directive given below in the virtual host entry of domain, if not add it.

Include “/usr/local/apache/conf/userdata/std/2/username/domainname/*.conf”

Now navigate to the directory

cd /usr/local/apache/conf/userdata/std/2/
check whether the folder named username(replace username with appropriate username) exist if not, create it.
mkdir username
cd username
cd domainname

If the directory “domainname” is not present, create it

Check for the file cp_jkmount.conf here, if it is not present, create it with the following contents

<IfModule mod_jk.c>
JkMount /*.jsp ajp13
JkMount /servlet/* ajp13
JkMount /servlets/* ajp13
JkMount /*.do ajp13

Verify the file /usr/local/jakarta/tomcat/conf/server.xml Add the entry for host

<Host name=”domainname” appBase=”/home/username/public_html”>
<Context path=”" reloadable=”true”
docBase=”/home/username/public_html” debug=”1″/>
<Context path=”/manager” debug=”0″ privileged=”true”

Restart the services

Start     /usr/sbin/stoptomcat
Stop     /usr/sbin/starttomcat
Restart /usr/sbin/restartsrv_tomcat

service httpd restart


Tomcat application manager

The username and password for accessing Tomcat manager is stored in /usr/local/jakarta/tomcat/conf/tomcat-users.xml file such as the following:

Sample JSP file code.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<H1>JSP Test</H1>
Time: <%= new java.util.Date() %>

FAIL - Application at context path / could not be started Errors

Fixed this issue after moved WEB-INF folder in domain home folder and reenabled tomcat on that domain...

Bulut Hosting Bireysel Hosting Kurumsal Hosting Bayi Hosting Uygulama Hosting Wordpress Hosting Joomla Hosting Drupal Hosting E-Ticaret Hosting Haber Hosting Veritabanı Hosting MySQL Hosting MongoDB Hosting PostgreSQL Hosting
Bulut Sunucu Bulut Sunucu Sunucu Barındırma Sunucu Kiralama Sunucu Yük Dengeleyici Bulut Sunucu Standart Bulut Sunucu Enterprise Bulut Sunucu SSD Premium Bulut Sunucu Sunucu Yük Dengeleyici Kiralama Güvenlik Duvarı Kiralama
Kurumsal Email Sunucu Standart Email Sunucu Professional Email Sunucu Enterprise Email Sunucu Bulut Email Bulut E-Posta Hosting Hosted Zimbra Spam/Virüs Gateway Mail Back Up Smart Host ETRN Hizmeti E-Posta Servisleri
Domain Alan Adı Tescil Alan Adı Transfer Alan Adı Yenileme TÜrkçe Alan Adı Kayıt Marka Tescil Marka Tescil Başvuru
CDN Çözümleri Statik Cache Hizmeti İçerik Hızlandırma Coğrafi İçerik Dağıtımı CDN Depolama SSL Sertifika Comodo SSL QuickSSL True BusinessID SSL

LiveZilla Live Help