JSP Tutorials - Herong's Tutorial Examples - Version 4.03, by Dr. Herong Yang
Downloading and Installing Tomcat 7
This section provides a tutorial example on how to download and install Apache Tomcat 7 on a Windows 7 local system. Tomcat 7 requires JDK 1.6.0.
If you want to learn JSP (JavaServer Page) technology, you should download and install Apache Tomcat on your local machine, so that you use it test your JSP pages. Here is what I did to download and install Apache Tomcat 7.0.32 on my Windows 7 local computer.
1. Visit Apache Tomcat home page with a Web browser, and click the "Download" link under the "Tomcat 7.0.32 Released" section. You will see the "Tomcat 7 Downloads" page.
2. Click "32-bit Windows zip" link under "Binary Distributions" section. You will see the download file save dialog box.
3. Use the "Save file" option to save the download file "apache-tomcat-7.0.32-windows-x86.zip" to a temporary folder.
4. Unzip "apache-tomcat-7.0.32-windows-x86.zip" to file installation folder \local\apache-tomcat-7.0.32.
5. Try to start Tomcat server by running the "startup" command in a command line window:
C:\herong>\local\apache-tomcat-7.0.32\bin\startup The CATALINA_HOME environment variable is not defined correctly This environment variable is needed to run this program
6. To fix the missing environment variable, CATALINA_HOME, I used the "set" command:
C:\herong>set CATALINA_HOME=\local\apache-tomcat-7.0.32 C:\herong>\local\apache-tomcat-7.0.32\bin\startup The JRE_HOME environment variable is not defined correctly This environment variable is needed to run this program
7. To fix the second missing environment variable, JRE_HOME, I need to find the path name where Java is installed. By looking the default Java folder, I see JDK 1.7.0_07 is installed on my local system:
C:\herong>dir \Progra~1\Java <DIR> jdk1.7.0_07 <DIR> jre7
8. Based on the documentation, Tomcat 7 requires JDK 1.6.0. So I am ready to set "JRE_HOME" and run the "startup" command again:
C:\herong>set JRE_HOME=\Progra~1\Java\jre7 C:\herong>\local\apache-tomcat-7.0.32\bin\startup Using CATALINA_BASE: "\local\apache-tomcat-7.0.32" Using CATALINA_HOME: "\local\apache-tomcat-7.0.32" Using CATALINA_TMPDIR: "\local\apache-tomcat-7.0.32\temp" Using JRE_HOME: "\Progra~1\Java\jre7" Using CLASSPATH: "\local\apache-tomcat-7.0.32\bin\bootstrap.jar; \local\apache-tomcat-7.0.32\bin\tomcat-juli.jar"
I think my Tomcat 7 installation is completed now. See the next section on how to start the Tomcat 7 server properly.
Last update: 2012.
Table of Contents