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

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.
1

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/version.sh

Example

---
[email protected] [~]# /usr/local/jakarta/tomcat/bin/version.sh
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:  5.5.36.0
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 --domain=domain.com

That’s it.

Reference : http://forums.cpanel.net/f402/cpanel-tomcat-jsp-servlets-guide-282922.html
Related links:
How to enable mod_deflate GZIP Compression on cPanel
How to enable mod_deflate in apache

Arunlal Ashok

Linux Server Administrator. I'm dealing with Linux servers since 2012. I started this blog to share and discuss my ideas with the world. Check My Profile!! in uPwork (oDesk) and let me know if you need any assistance. Thanks!!

You may also like...

2 Responses

  1. Vivek Soni says:

    You can install cpanel4j ( http://www.cpanel4j.com ) to use tomcat in cPanel.

  1. January 9, 2014

    […] links; Installation of Tomcat and adding JSP support for a domain on a cpanel server How to enable mod_deflate in […]

Leave a Reply

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