-
Notifications
You must be signed in to change notification settings - Fork 0
tomcat
Apache Tomcat is a web container which allows to run servlet and JavaServer Pages (JSP) based web applications. Most of the modern Java web frameworks are based on servlets, e.g. JavaServer Faces, Struts, Spring.
Apache Tomcat also provides by default a HTTP connector on port 8080, i.e., Tomcat can also be used as HTTP server. But the performance of Tomcat is not as good as the performance of a designated web server, like the Apache HTTP server.
##2.1. Ubuntu Linux
For Ubuntu you can install Tomcat via the following commands.
sudo apt-get install tomcat7
sudo apt-get install tomcat7-admin
sudo apt-get install tomcat7-docs
sudo apt-get install tomcat7-examples
##2.2. Windows
Download the Windows installer for Tomcat7 from the Apache Tomcat Homepage and run the installer.
#3. Managing Apache Tomcat ##3.1. Start Tomcat on Ubuntu (Linux)
In Ubuntu the Tomcat server is started automatically. To restart Tomcat use the following command.
# Restart
sudo /etc/init.d/tomcat7 restart
# Stop
sudo /etc/init.d/tomcat7 stop ##3.2. Start Tomcat on Windows
To start Tomcat use tomcat7.exe in the bin directory.
##3.3. Test Tomcat
The default port for Tomcat is 8080. After starting Tomcat on your local machine, you can validate if Tomcat is running the URL: http://localhost:8080
This should show a web page similar to the following.
