This section provides an overview of what tomcat is, and why a developer might want to use it.
It should also mention any large subjects within tomcat, and link out to the related topics. Since the Documentation for tomcat is new, you may need to create initial versions of those related topics.
| Version | Java | Servlet | JSP | EL | WebSocket | JASPIC | Released |
|---|---|---|---|---|---|---|---|
| 6.0.x | 5+ | 2.5 | 2.1 | 2.1 | n/a | n/a | 2006-12-01 |
| 7.0.x | 6+ | 3.0 | 2.2 | 2.2 | 1.1 | n/a | 2010-06-02 |
| 8.0.x | 7+ | 3.1 | 2.3 | 3.0 | 1.1 | n/a | 2013-08-05 |
| 8.5.x | 7+ | 3.1 | 2.3 | 3.0 | 1.1 | 1.1 | 2016-06-13 |
| 9.0.x | 8+ | 4.0 | 2.4 | 3.1 | 1.2 | 1.1 | 2016-06-13 |
Detailed instructions on getting tomcat set up or installed.
This example demonstrates how to install Tomcat as a service on Ubuntu using the *.tar.gz releases of both Tomcat as well as Java.
/opt/ /opt/jre1.Xxxx/ cd /opt; sudo ln -s jre1.Xxxxx java
sudo vim /etc/environment JAVA_HOME="/opt/java"
sudo useradd -r tomcat /opt/ /opt/apache-tomcat-XXXX sudo chown -R tomcat ./* sudo chgrp -R tomcat ./* CATALINA_HOME environment variable:sudo vim /etc/environment CATALINA_HOME="/opt/tomcat" tomcat-users.xml sudo vim /opt/tomcat/conf/tomcat-users.xml <user username="admin" password="adminpw" roles="manager-gui"> <tomcat-users> ... </tomcat-users> tagsAdd a script in /etc/init.d called tomcat and make it executable. The content of the script can look something like:
RETVAL=$?
CATALINA_HOME="/opt/tomcat"
case "$1" in
start)
if [ -f $CATALINA_HOME/bin/startup.sh ];
then
echo $"Starting Tomcat"
sudo -u tomcat $CATALINA_HOME/bin/startup.sh
fi
;;
stop)
if [ -f $CATALINA_HOME/bin/shutdown.sh ];
then
echo $"Stopping Tomcat"
sudo -u tomcat $CATALINA_HOME/bin/shutdown.sh
fi
;;
*)
echo $"Usage: $0 {start|stop}"
exit 1
;;
esac
exit $RETVAL
To make it start on boot, run: sudo update-rc.d tomcat defaults
You can also add a bash line to /etc/rc.local for example service tomcat start
Edit the file $CATALINA_HOME/bin/setenv.sh and add the properties in here, for example: CLASSPATH=/additional/class/directories