Outdated: Installing Tomcat 5.5.7

This section provides a tutorial example on how to download and install Apache Tomcat 5.5.4 on a Windows computer. Testing of HTML document and JPS page on the Tomcat server is also provided.

Tomcat 5.5.7 is a Web server and supports Servlet 2.4 and JSP 2.0. It requires JDK 1.5 or later. I did the following to get Tomcat 5.5.7 installed on my Windows computer:

1. Checked JDK requirement. I had JDK 1.5.0 installed on \local\j2sdk1.5.0.

2. Downloaded jakarta-tomcat-5.5.7.zip from http://jakarta.apache.org/tomcat.

3. Unzipped jakarta-tomcat-5.5.7.zip in \local.

4. Started Tomcat server:

cd \local\jakarta-tomcat-5.5.7\bin
set JAVA_HOME=\local\j2sdk1.5.0

5. Tomcat created a separate command window, on which I got:

 11:09:23 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
 11:09:23 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 631 ms
 11:09:23 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
 11:09:23 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.7

6. Ran Internet Explorer (IE) with url: http://localhost:8080. I got the Tomcat home page with the following message:

Apache Tomcat/5.5.7
If you're seeing this page via a web browser, it means you've setup 
Tomcat successfully. Congratulations!

7. To find out where the document root directory of this Web server is located, let's create a text file called: hello.html:

<html><body>Hello world!</body></html>

8. Then save hello.html to \local\jakarta-tomcat-5.5.7\webapps\ROOT. Now, run IE with url: http://localhost:8080/hello.html. You should see "Hello world!" in the IE window.

9. To verify if Tomcat supports JSP or not, let's create hello.jsp:

<% out.println("Hello world! -- From JSP"); %>

10. Then save hello.jsp to \local\jakarta-tomcat-5.5.7\webapps\ROOT. Now, ran IE with url: http://localhost:8080/hello.jsp. You should see "Hello world! -- From JSP" in the IE window.

Congratulations! I have successfully served an JSP page through Tomcat.

Last update: 2006.

Table of Contents

 About This Book

 JSP (JavaServer Pages) Overview

 Tomcat 7 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

Outdated Tutorials

 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

Outdated: Installing Tomcat 5.5.7


 PDF Printing Version