Tomcat installation is located in the /hsphere/local/home/cpanel/jakarta directory.
Important: The core Parallels H-Sphere directories such as shiva, shiva-templates, psoft, and psoft-config are located in the /hsphere/local/home/cpanel/hsphere/WEB-INF/classes/ directory with Parallels H-Sphere classes run by Tomcat. Symlinks to these new locations are put in place of the old directories to preserve Parallels H-Sphere integrity with previous versions' configuration.
Tomcat configuration files are located in the /hsphere/local/home/cpanel/jakarta/conf directory:
/hsphere/local/home/cpanel/jakarta/conf/server.xml - XML config file for Tomcat;/hsphere/local/home/cpanel/hsphere/WEB-INF/web.xml - XML configuration file where CP servlet configuration is set;/hsphere/local/home/cpanel/apache/etc/mod_jk.conf - mod_jk configuration. mod_jk is a Tomcat-Apache plug-in that handles the communication between Tomcat and Apache. For more details, see Apache documentation on mod_jk (http://jakarta.apache.org/tomcat/tomcat-3.3-doc/mod_jk-howto.html).Tomcat log file is /hsphere/local/home/cpanel/jakarta/logs/catalina.out.
Jakarta connector log is /hsphere/local/home/cpanel/apache/logs/mod_jk.log.
To stop Tomcat:
Run:
/hsphere/local/home/cpanel/jakarta/bin/catalina.sh stop
To start Tomcat:
Run:
/hsphere/local/home/cpanel/jakarta/bin/catalina.sh start
Tomcat is also restarted when restarting Parallels H-Sphere (Tomcat is restarted together with CP Apache):
/etc/init.d/httpdcp restart
Note: Sometimes you might need to restart only CP Apache, keeping Tomcat running. Then, use the following option:
/etc/init.d/httpdcp restartapache
The file ~cpanel/setenv.sh is designed to customize Tomcat environment variables.
For example, to allocate Java memory in the range between 64 MB and 512 MB:
Log in as cpanel user.~cpanel/setenv.sh: -bash-2.05b$ vi ~cpanel/setenv.sh
Set the following line in the file:
export CATALINA_OPTS="-Xms64M -Xmx512M"
Using external settings -Xms64M -Xmx512M
+ java version 1.4.x
Using CATALINA_BASE: /hsphere/local/home/cpanel/jakarta
Using CATALINA_HOME: /hsphere/local/home/cpanel/jakarta
Using CATALINA_TMPDIR: /hsphere/local/home/cpanel/jakarta/temp
Using JAVA_HOME: /usr/java/jdk
-bash-2.05b$ ps auwx | grep java
cpanel 3010 99.9 29.6 436776 27652 pts/0 S 05:54 0:09 /usr/java/jdk/bin/java -Xms64M -Xmx512M -Djava.awt.headless=true - Djava.endorsed.dirs=/hsphere/local/home/cpanel/jakarta/common/endorsed -classpath /usr/java/jdk/lib/tools.jar:/hsphere/local/home/cpanel/jakarta/bin/bootstrap.jar:/hsphere/local/home/cpanel/j
cpanel 3020 0.0 0.7 3680 664 pts/0 S 05:54 0:00 grep java