So I finally installed the service startupitem. I found 2 problems/issues with the instructions:

1) the command in the startupitems/tomcat/tomcat file needs to be:

sudo -u tomcat /usr/local/tomcat/bin/startup.sh

not

su tomcat - /usr/local/tomcat/bin/startup.sh

The latter gave me "incorrect permissions" error on startup (su requires that you enter the users password, even if you are root, sudo does not.

Also in the same file it should have a structure which is pretty standard for services, and also causes an automatic restart of the service if it crashes.

The one as shown will work fine, but I am suggesting this:

after the three export commands in place of:

if [ "${TOMCAT}" = "-YES-" ]; then
ConsoleMessage "Starting Tomcat"
su tomcat - /usr/local/tomcat/bin/startup.sh
fi

use:

StartService ()
{

if [ "${TOMCAT}" = "-YES-" ]; then
ConsoleMessage "Starting Tomcat"
sudo -u tomcat /usr/local/tomcat/bin/startup.sh
fi

}

StopService ()
{
ConsoleMessage "Stopping Tomcat"
sudo -u tomcat /library/usr/local/bin/shutdown.sh
}

RestartService ()
{
StopService
StartService
}

RunService "$1"