JSP Tutorials - Herong's Tutorial Examples - v5.11, by Herong Yang
Archived: 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 can use it to 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:
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:
herong> set CATALINA_HOME=\local\apache-tomcat-7.0.32 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:
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:
herong> set JRE_HOME=\Progra~1\Java\jre7 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 tutorial on how to start the Tomcat 7 server properly.
Table of Contents