Archived: Installing Tomcat 4.1.18

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

Tomcat is a free, open-source implementation of Java Servlet and JavaServer Pages technologies developed under the Jakarta project at the Apache Software Foundation.

Tomcat 4.1.18 is a web server and supports Servlet 2.3 and JSP 1.2. It requires JDK 1.2 or later. I did the following to get Tomcat 4.1.18 installed on my Windows system:

1. Checked JDK requirement. I had JDK 1.3.1 installed on \local\jdk1.3.1.

2. Downloaded from

3. Unzipped in \local.

4. Started Tomcat server:

cd \local\jakarta-tomcat-4.1.18\bin
set JAVA_HOME=\local\jdk1.3.1

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

[INFO] Registry - -Loading registry information
[INFO] Registry - -Creating new Registry instance
[INFO] Registry - -Creating MBeanServer
[INFO] Http11Protocol - -Initializing Coyote HTTP/1.1 on port 8080
Starting service Tomcat-Standalone
Apache Tomcat/4.1.18
[INFO] Http11Protocol - -Starting Coyote HTTP/1.1 on port 8080
[INFO] ChannelSocket - -JK2: ajp13 listening on
[INFO] JkMain - -Jk running ID=0 time=30/130  config=C:\local\jakarta-

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

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

7. To find out where it document root directory of this Web server, let's create hello.html:

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

8. Then save hello.html to \local\jakarta-tomcat-4.1.18\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!"); %>

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

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

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

Archived Tutorials

 Archived: Installing GlassFish JSTL 1.2 on Tomcat

 Archived: Downloading and Installing Tomcat 7

 Archived: Installing Tomcat 5.5.7

Archived: Installing Tomcat 4.1.18

 Archived: Java Class Converted by Tomcat 4.1.18

 Archived: Hijacking Servlet Converted from JSP

 Archived: Using Perl LWP::Debug Module to Debug

 Archived: Installing JSTL 1.0 Apache Implementation

 Archived: Upgrade JDK 1.3 to JDK 1.4 on Tomcat 4.1

 Archived: Compilation Errors with JDK 1.4

 Archived: Using JavaBean without Import Element Error


 Full Version in PDF/EPUB