Outdated: 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:

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 tutorial on how to start the Tomcat 7 server properly.

Table of Contents

 About This Book

 JSP (JavaServer Pages) Overview

 Tomcat Installation on Windows Systems

 JSP Scripting Elements

 Java Servlet Introduction

 JSP Implicit Objects

 Syntax of JSP Pages and JSP Documents

 JSP Application Session

 Managing Cookies in JSP Pages

 JavaBean Objects and "useBean" Action Elements

 Managing HTTP Response Header Lines

 Non-ASCII Characters Support in JSP Pages

 Performance of JSP Pages

 EL (Expression Language)

 Overview of JSTL (JSP Standard Tag Libraries)

 JSTL Core Library

 JSP Custom Tags

 JSP Java Tag Interface

 Custom Tag Attributes

 Multiple Tags Working Together

 File Upload Test Application

 Using Tomcat on CentOS Systems

 Using Tomcat on macOS Systems

 Connecting to SQL Server from Servlet

 Developing Web Applications with Servlet

Outdated Tutorials

 Outdated: Installing GlassFish JSTL 1.2 on Tomcat

Outdated: Downloading and Installing Tomcat 7

 Outdated: Installing Tomcat 5.5.7

 Outdated: Installing Tomcat 4.1.18

 Outdated: Java Class Converted by Tomcat 4.1.18

 Outdated: Hijacking Servlet Converted from JSP

 Outdated: Using Perl LWP::Debug Module to Debug

 Outdated: Installing JSTL 1.0 Apache Implementation

 Outdated: Upgrade JDK 1.3 to JDK 1.4 on Tomcat 4.1

 Outdated: Compilation Errors with JDK 1.4

 Outdated: Using JavaBean without Import Element Error

 References

 Full Version in PDF/EPUB