Actually, I was able to get 5 instances of tomcat running on cpanel 11... and it really works like a charm.No.
There is one main Tomcat process and several children.
... MITI package looks good.Well sure, if you do the other 4 installs manually. But that wasn't the question. You can also run multiple Tomcat instances from the same CATALINA_HOME locaiton using jsvc. Check out http://miti.sourceforge.net/ for example.
You still have to configure the AJP connectors manually... miti just reduces the manual work.if you do the other 4 installs manually ... check out http://miti.sourceforge.net/ for example.
I'm interested!If anyone is looking to have 1 main tomcat and many instances running, let me know and I can post a how-to.
It's fairly straightforward.
Lamp.
Step 2 - Configure the Tomcat Instance#!/bin/bash
export INSTANCE_NAME=user1
export CATALINA_BASE=/usr/local/tomcat/instances/user1
#This is where you'd be able to restrict the memory usage
export CATALINA_OPTS=" -Djava.awt.headless=true"
# Call the jsvc script to launch the Tomcat instance
/usr/local/tomcat/bin/Tomcat5.sh $1
Modify start case with the following:DAEMON_HOME=/usr/local/tomcat/bin
PIDFILE=/var/run/jsvc-$INSTANCE_NAME.pid
TMP_DIR=/usr/local/jakarta/servers/$INSTANCE_NAME/temp
TOMCAT_USER=$INSTANCE_NAME
Modify end case with the following:$DAEMON_HOME/jsvc \
-user $TOMCAT_USER \
-home $JAVA_HOME \
-outfile $CATALINA_BASE/logs/catalina.out \
-errfile $CATALINA_BASE/logs/catalina.err \
-pidfile "$PIDFILE" \
\
-Dcatalina.home=$CATALINA_HOME \
-Dcatalina.base=$CATALINA_BASE \
-Djava.io.tmpdir=$TMP_DIR \
$CATALINA_OPTS \
-cp $CLASSPATH \
org.apache.catalina.startup.Bootstrap \
;;
Step 3 - Configure ApachePID=`cat $PIDFILE`
kill $PID
rm $PIDFILE
;;
Thanks for the info. I've never used struts..do is the commonly used path extension of Struts.
Struts is the most popular JAVA Framework in use:
http://struts.apache.org
Add /*.do like this:Hi,
But according to one of my user it is only JSP and not servlet since it can not load .do file.
whereas the index.jsp is working fine at http://www.sakariya.comHTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP:
JSP FileName:/Menus/AdminMenu.jsp
Java FileName:/usr/local/jakarta/apache-tomcat-5.5.25/work/Catalina/sakariya.com/JSP//org/apache/jsp/Menus/AdminMenu_jsp.java
An error occurred at line: 4 in the jsp file: /Menus/AdminMenu.jsp
User cannot be resolved to a type
1: <%@page contentType="text/html"%>
2: <%@page import = 'Beans.*' %>
3: <%
4: User user = (User)session.getAttribute("user");
5: if(user == null || !user.getCurrentUserTypeRef().equals("administrato r"))
6: {
7: session.setAttribute("message", "Administrator Login failed. Please Login."); %>
JSP FileName:/Menus/AdminMenu.jsp
Java FileName:/usr/local/jakarta/apache-tomcat-5.5.25/work/Catalina/sakariya.com/JSP//org/apache/jsp/Menus/AdminMenu_jsp.java
An error occurred at line: 4 in the jsp file: /Menus/AdminMenu.jsp
User cannot be resolved to a type
1: <%@page contentType="text/html"%>
2: <%@page import = 'Beans.*' %>
3: <%
4: User user = (User)session.getAttribute("user");
5: if(user == null || !user.getCurrentUserTypeRef().equals("administrato r"))
6: {
7: session.setAttribute("message", "Administrator Login failed. Please Login."); %>
Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.jav acError(DefaultErrorHandler.java:98)
org.apache.jasper.compiler.ErrorDispatcher.javacEr ror(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateCla ss(JDTCompiler.java:435)
org.apache.jasper.compiler.Compiler.compile(Compil er.java:298)
org.apache.jasper.compiler.Compiler.compile(Compil er.java:277)
org.apache.jasper.compiler.Compiler.compile(Compil er.java:265)
org.apache.jasper.JspCompilationContext.compile(Js pCompilationContext.java:564)
org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:302)
org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet .java:803)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.25 logs.
Apache Tomcat/5.5.25
The developer says, it is not compiling JSP pages.Server Information is:
WHM 11.15.0 cPanel 11.18.1-R20683
CENTOS Enterprise 4.6 i686 on virtuozzo - WHM X v3.1.0
Tomcat Version Apache Tomcat/5.5.25
JVM Version 1.6.0_02-b05
JVM Vendor Sun Microsystems Inc.
OS Name Linux
OS Version 2.6.18-53.el5.028stab051.1
OS Architecture i386
Above entry is working fine for me, application get deployed automatically without restarting TomCat, any changes made to application are also accepted without restart.<Host name="domain.com" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false" reloadable="true">
<Alias>www.domain.com</Alias>
<Context path="" reloadable="true" docBase="/home/domain/public_html" debug="0" privileged="true" autoDeploy="true" liveDeploy="true">
<Resource name="jdbc/domain" auth="Container" type="javax.sql.DataSource"
maxActive="100" maxIdle="30" maxWait="10000"
username="test" password="test" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/test"/>
</Context>
</Host>
I have a virgin installation of CPanel and tomcat. First time it has been used. Tomcat5.5.28 is installed at /usr/local/jakarta/tomcat/Here's why you would want to do this:
Step 3 - Modify Main Tomcat (One-Time)
======================================
Edit $TOMCAT_HOME/bin/Tomcat5.sh
Hmm... But cpanel will overwrite your edits directly to httpd.conf. As I understand it, to distill a manual modification to httpd.conf you must run /usr/local/cpanel/bin/apache_conf_distiller --update after you have saved the config fileHere's why you would want to do this:
Step 3 - Configure Apache
=========================
- Edit httpd.conf
Add the following code under the VirtualHost definition of the user in question:
<IfModule mod_jk.c>
JkMount /*.jsp user1
JkMount /webapps/* user1
JkMount /servlets/* user1
JkMount /servlet/* user1
</IfModule>
Thread starter | Similar threads | Forum | Replies | Date |
---|---|---|---|---|
T | PHP and Tomcat Question. | Web Servers and Applications | 0 | |
Z | Tomcat question | Web Servers and Applications | 2 | |
F | Tomcat Web Manager Question | Web Servers and Applications | 0 | |
M | Tomcat question | Web Servers and Applications | 1 | |
![]() |
servlet tomcat question | Web Servers and Applications | 2 |