From owner-freebsd-java Mon Feb 4 9:50:13 2002 Delivered-To: freebsd-java@freebsd.org Received: from azrael.xs4all.nl (azrael.xs4all.nl [213.84.50.139]) by hub.freebsd.org (Postfix) with ESMTP id 40D0A37B41D for ; Mon, 4 Feb 2002 09:49:53 -0800 (PST) Received: (from remco@localhost) by azrael.xs4all.nl (8.11.6/8.11.6) id g14Hnma94528; Mon, 4 Feb 2002 18:49:48 +0100 (CET) (envelope-from remco) Date: Mon, 4 Feb 2002 18:49:48 +0100 From: "Remco van 't Veer" To: Ernst de Haan Cc: java@FreeBSD.ORG Subject: Re: Port updated: www/jakarta-tomcat Message-ID: <20020204174948.GH55277@azrael.xs4all.nl> References: <200202041342.g14DgE516387@zaphod.euronet.nl> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="LQksG6bCIzRHxTLp" Content-Disposition: inline In-Reply-To: <200202041342.g14DgE516387@zaphod.euronet.nl> User-Agent: Mutt/1.3.27i X-Spook: SNT SEAL GEODSS Fort Meade RSA mailbomb White House lamma MD2 I&A Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --LQksG6bCIzRHxTLp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline JSP don't work because the JAVA_HOME (if not set) is setup after trying to include tools.jar in de CLASSPATH. Attached you will find a modified version of tomcatctl which sets up tools.jar properly and puts the JVM in the background when starting. Remco PS. great work, thanks! On Mon, Feb 04, 2002 at 14:42, Ernst de Haan wrote: > The Tomcat port has been updated. Changes: > > * Bumped PORTREVISION > * Now displays installation settings > * Now possible to choose JDK. By default uses FreeBSD JDK 1.3.1 (instead of > FreeBSD JDK 1.1.8) > * Does not depend on pinstall anymore > * Now possible to change TOMCAT_HOME. By default uses > ${PREFIX}/jakarta-tomcat-3.2.3 (instead of ${PREFIX}/tomcat) > * Now possible to change LISTEN_PORT. Default is 8080 (unchanged) > * Added support for running Tomcat as a different user/group. By default a > new user 'tomcat' and a new group 'tomcat' are created and used > * A 'tomcatctl' script is installed in /usr/local/bin/, which uses > interprocess communication to start/stop/restart Tomcat > * Option is added for automatically starting Tomcat after install > (AUTO_START). By default Tomcat is started right away > * Appends stdout and stderr to log files > * Uses a numeric prefix for the script in ${LOCALBASE}/etc/rc.d (now by > default 020.jakarta-tomcat.sh instead of tomcat.sh) > > Comments are welcome. Working on the transition to 3.3a now... > > Ernst -- It is our responsibility to achieve progress in harnessing evolutionary mega-assets and speedily generating scalable mindshare. --LQksG6bCIzRHxTLp Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=tomcatctl #!/bin/sh # Set some variables VERSION=3.2.3 APP_HOME=/usr/local/jakarta-tomcat3.2.3 USER_NAME=tomcat STDOUT_LOG=/usr/local/jakarta-tomcat3.2.3/logs/stdout.log STDERR_LOG=/usr/local/jakarta-tomcat3.2.3/logs/stderr.log JAR_FILE=${APP_HOME}/lib/webserver.jar MYSELF=`basename $0` # Set the CLASSPATH unset CLASSPATH for i in ${APP_HOME}/lib/* ; do if [ "$CLASSPATH" != "" ]; then CLASSPATH=${CLASSPATH}:$i else CLASSPATH=$i fi done # Check if we're being run as a shell script or as an rc script if [ ${MYSELF} = "jakarta-tomcat.sh" ]; then AS_RC_SCRIPT=yes else AS_RC_SCRIPT=no fi # Check if the JAVA_HOME directory is defined, otherwise set it to the # fallback default if [ "${JAVA_HOME}a" = "a" ]; then JAVA_HOME=/usr/local/jdk1.3.1 fi JAVA_CMD=${JAVA_HOME}/bin/java # include tools.jar for jasper if [ -f ${JAVA_HOME}/lib/tools.jar ] ; then CLASSPATH=${CLASSPATH}:${JAVA_HOME}/lib/tools.jar fi # Function that starts the application start() { # Make sure the application directory does exist if [ ! -d ${APP_HOME} ]; then if [ "${AS_RC_SCRIPT}" = "yes" ]; then echo "" fi echo "tomcat: ERROR: Unable to find Jakarta Tomcat home directory at ${APP_HOME}." exit 2 fi # Make sure the application JAR file exists if [ ! -r ${JAR_FILE} ]; then if [ "${AS_RC_SCRIPT}" = "yes" ]; then echo "" fi echo "tomcat: ERROR: Unable to find Jakarta Tomcat JAR file at ${JAR_FILE}." exit 3 fi # Make sure the Java VM can be found if [ ! -x ${JAVA_CMD} ]; then if [ "${AS_RC_SCRIPT}" = "yes" ]; then echo "" fi echo "tomcat: ERROR: Unable to find Java VM at ${JAVA_HOME}." exit 4 fi if [ "${AS_RC_SCRIPT}" = "yes" ]; then echo -n " tomcat" fi su - ${USER_NAME} -c "(cd ${APP_HOME} && ${JAVA_CMD} -cp ${CLASSPATH} -Dtomcat.home=${APP_HOME} org.apache.tomcat.startup.Tomcat) >> ${STDOUT_LOG} 2>> ${STDERR_LOG} &" } # Function that stops the application stop() { if [ "${AS_RC_SCRIPT}" = "yes" ]; then echo -n " tomcat" fi su - ${USER_NAME} -c "(cd ${APP_HOME} && ${JAVA_CMD} -cp ${CLASSPATH} -Dtomcat.home=${APP_HOME} org.apache.tomcat.startup.Tomcat -stop) >> ${STDOUT_LOG} 2>> ${STDERR_LOG}" } case "$1" in start) start ;; stop) stop ;; restart) stop start ;; *) echo "" echo "Usage: ${MYSELF} { start | stop | restart }" echo "" exit 64 ;; esac --LQksG6bCIzRHxTLp-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message