First I have tomcat 5 working fine, play around trying to get it to work with db2 jdbc driver (in shared/lib) eventually get it working.
setup tomcat as daemon using jsvc and tomcat starts but won't look in shared lib and can't find the driver class...
decide to skip jsvc and try and start tomcat from rc.local with... su - db2inst1 -c "/usr/local/tomcat/bin/startup.sh"
this won't work as it can't find the JAVA_HOME env (even tho it is set)
my test jsp page still works if i start tomcat manually with startup.sh but i don't want to have to do that....
can anyone help either with jsvc or using rc.local...
here is the rc.tomcat script created for jsvc
#!/bin/sh ############################################################################## # # Copyright 2004 The Apache Software Foundation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ############################################################################## # # Small shell script to show how to start/stop Tomcat using jsvc # If you want to have Tomcat running on port 80 please modify the server.xml # file: # # <!-- Define a non-SSL HTTP/1.1 Connector on port 80 --> # <Connector className="org.apache.catalina.connector.http.HttpConnector" # port="80" minProcessors="5" maxProcessors="75" # enableLookups="true" redirectPort="8443" # acceptCount="10" debug="0" connectionTimeout="60000"/> # # That is for Tomcat-5.0.x (Apache Tomcat/5.0) # # Adapt the following lines to your configuration JAVA_HOME=/usr/lib/java CATALINA_HOME=/usr/local/tomcat DAEMON_HOME=/usr/local/tomcat/bin TOMCAT_USER=db2inst1 TMP_DIR=/var/tmp CATALINA_OPTS= CLASSPATH=\ $JAVA_HOME/lib/tools.jar:\ $CATALINA_HOME/bin/commons-daemon.jar:\ $CATALINA_HOME/bin/bootstrap.jar:\ $CATALINA_HOME
case "$1" in start) # # Start Tomcat # $DAEMON_HOME/jsvc \ -user $TOMCAT_USER \ -home $JAVA_HOME \ -Dcatalina.home=$CATALINA_HOME \ -Djava.io.tmpdir=$TMP_DIR \ -outfile $CATALINA_HOME/logs/catalina.out \ -errfile '&1' \ $CATALINA_OPTS \ -cp $CLASSPATH \ org.apache.catalina.startup.Bootstrap # # To get a verbose JVM #-verbose \ # To get a debug of jsvc. #-debug \ ;;
stop) # # Stop Tomcat # PID=`cat /var/run/jsvc.pid` kill $PID ;;
*) echo "Usage tomcat.sh start/stop" exit 1;; esac
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
