Installation of Tomcat and adding JSP support for a domain on a cpanel server

This post was created few years ago. And it’s for EasyApache3. 

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?

You can install/enable the tomcat module from the command line by executing easyapache (/scripts/easyapache). Make sure that you have taken a backup of apache and php configuration file before starting the easyapache process.

# /scripts/easyapache 

And select the Tomcat option and rebuild the apache with php.
Refer the pic for more clarification.

You will get the below message after rebuilt the server.

!! Build Complete! !!

How to check the tomcat details from command line?
After the tomcat installation, you can check the tomcat details by executing the following command.

# /usr/local/jakarta/tomcat/bin/


root@server [~]# /usr/local/jakarta/tomcat/bin/
Using CATALINA_BASE:   /usr/local/jakarta/tomcat
Using CATALINA_HOME:   /usr/local/jakarta/tomcat
Using CATALINA_TMPDIR: /usr/local/jakarta/tomcat/temp
Using JRE_HOME:        /usr/local/jdk
Using CLASSPATH:       /usr/local/jakarta/tomcat/bin/bootstrap.jar
Server version: Apache Tomcat/5.5.36
Server built:   Oct 5 2012 02:04:50
Server number:
OS Name:        Linux
OS Version:     2.6.18-308.8.2.el5.028stab101.1
Architecture:   amd64
JVM Version:    1.6.0_37-b06
JVM Vendor:     Sun Microsystems Inc.

How to enable tomcat for a domain under your cpanel server?

# /usr/local/cpanel/scripts/addservlets2

That’s it.

Reference :
Related links:
How to enable mod_deflate GZIP Compression on cPanel
How to enable mod_deflate in apache

Post navigation

Arunlal A

Senior System Developer at Zeta. Linux lover. Traveller. Let's connect! Whether you're a seasoned DevOps pro or just starting your journey, I'm always eager to engage with like-minded individuals. Follow my blog for regular updates, connect on social media, and let's embark on this DevOps adventure together! Happy coding and deploying!

7 thoughts on “Installation of Tomcat and adding JSP support for a domain on a cpanel server

  1. /usr/local/cpanel/scripts/addservlets2 –
    it showed ‘addservlets2’ directory not found…
    so i tried /usr/local/cpanel/scripts/addservlets –
    and shell just freezes and nothing happens

  2. It will be loaded with a WP installation after it is created. I really appreciate sharing this great post. Keep up your work.

  3. This is the perfect blog for anyone who wants to know about this topic. The article is nice and it’s pleasant to read. I have known very important things over here. Thank you so much for this post.

Leave a Reply

Your email address will not be published. Required fields are marked *