Create a Shell script that checks if tomcat is up or down and set a cron for sh to make it check every few minutes, and auto start tomcat if down. Sample Snippet of code below
TOMCAT_PID=$(ps -ef | awk '/[t]omcat/{print $2}')
echo TOMCAT PROCESSID $TOMCAT_PID
if [ -z "$TOMCAT_PID" ]
then
echo "TOMCAT NOT RUNNING"
sudo /opt/tomcat/bin/startup.sh
else
echo "TOMCAT RUNNING"
fi