Tomcat is an open source application server from the Apache Software Foundation. Tomcat implements the Java Servlet and JavaServer Pages specifications, which are part of the JEE (Java Enterprise Edition) specifications, specifically the web container. The latest version of the Tomcat is 7.0.42, and it will be used for the examples in this chapter.
The Tomcat application server can be downloaded from http://tomcat.apache.org/download-70.cgi.
Uncompress the Tomcat file in the ${HOME}
directory on Linux systems or C:
on Windows systems.
Set the TOMCAT_HOME
environment variable and start Tomcat on Linux:
export TOMCAT_HOME=${HOME}/apache-tomcat-7.0.42 ${TOMCAT_HOME}/bin/startup/sh
Set the TOMCAT_HOME
environment variable and start Tomcat on Windows:
set TOMCAT_HOME=C:\apache-tomcat-7.0.42 %TOMCAT_HOME%\bin\startup.bat
Verify that Tomcat is running correctly by going to the following website:
http://localhost:8080/
You should see the following screenshot: