It's been almost two months, but even if you guys have gotten it, maybe this will help someone else.
I hacked a Tomcat startup item together using the Apache StartupItem and the tomcat.sh script from the tomcat/bin folder...
If you don't know how to create a startup item, rtfm.

P
This note is to just help with the contents of the StartupParameters.plist and Tomcat executable.
<file name="StartupParameters.plist">
{
Description = "Tomcat Servlet Engine";
Provides = ("Tomcat");
Requires = ("Disks", "Resolver");
Uses = ("NFS", "Network Time");
OrderPreference = "Late";
Messages =
{
start = "Starting tomcat servlet engine";
stop = "Stopping tomcat servlet engine";
};
}
</file>
<file name="Tomcat">
#!/bin/sh
. /etc/rc.common
if [ -f $HOME/.tomcatrc ] ; then
. $HOME/.tomcatrc
fi
if [ "${TOMCAT_HOME:=}" = "" ] ; then
# try to find tomcat
if [ -d /usr/local/jakarta-tomcat-3.2.1/conf ] ; then
TOMCAT_HOME=/usr/local/etc/jakarta-tomcat-3.2.1
echo "Defaulting TOMCAT_HOME to $TOMCAT_HOME"
else
echo TOMCAT_HOME not set or found at /usr/local/etc/jakarta-tomcat-3.2.1/conf
exit 1
fi
fi
if [ -z "${JAVA_HOME:=}" ] ; then
JAVA=`which java`
if [ -z "$JAVA" ] ; then
echo "Cannot find JAVA. Please set your PATH."
exit 1
fi
JAVA_BINDIR=`dirname $JAVA`
JAVA_HOME=$JAVA_BINDIR/..
fi
if [ "${JAVACMD:=}" = "" ] ; then
# it may be defined in env - including flags!!
JAVACMD=$JAVA_HOME/bin/java
fi
oldCP=${CLASSPATH:=}
CLASSPATH=""
for i in ${TOMCAT_HOME}/lib/* ; do
if [ "$CLASSPATH" != "" ]; then
CLASSPATH=${CLASSPATH}:$i
else
CLASSPATH=$i
fi
done
if [ -f ${JAVA_HOME}/lib/tools.jar ] ; then
# We are probably in a JDK1.2 environment
CLASSPATH=${CLASSPATH}:${JAVA_HOME}/lib/tools.jar
fi
# Backdoor classpath setting for development purposes when all classes
# are compiled into a /classes dir and are not yet jarred.
if [ -d ${TOMCAT_HOME}/classes ]; then
CLASSPATH=${TOMCAT_HOME}/classes:${CLASSPATH}
fi
if [ "$oldCP" != "" ]; then
CLASSPATH=${CLASSPATH}:${oldCP}
fi
export CLASSPATH
# We start the server up in the background for a couple of reasons:
# 1) It frees up your command window
# 2) You should use `stop` option instead of ^C to bring down the server
cd $TOMCAT_HOME/bin
$JAVACMD -Dtomcat.home=${TOMCAT_HOME} org.apache.tomcat.startup.Tomcat 1>>$TOMCAT_HOME/logs/tomcat.log 2>&1 &
if [ "$oldCP" != "" ]; then
CLASSPATH=${oldCP}
export CLASSPATH
else
unset CLASSPATH
fi
</file>
Again, this is a HACK!! I'm sure there's a better way to get this running, but this'll get you started.
hth,
-k