Servlet Essentials 1.3.5

Stefan Zeiger

Servlet Essentials

Version 1.3.5 of November 4, 1999

Covers Servlet API versions 1.0, 2.0 and 2.1


This document explains the concepts of Java Servlets and provides a step-by-step tutorial for writing HTTP Servlets with complete source code for the example Servlets. The tutorial and the other chapters cover all facets of Servlet programming from a simple "Hello World" Servlet to advanced Servlet features like session tracking and Cookies. There are also appendices on compiling and running Servlets. The reader is assumed to have some basic knowledge of HTML and Java programming.

Table of Contents

0. Preface
0.1 About this Document
0.2 Changes
0.3    Style
1. An Invitation to Servlets
1.1 What is a Servlet?
1.2 Servlets vs CGI
1.3 The Basic Servlet Architecture
1.4 HTTP
2. Servlets Step by Step
2.1 Hello World!
2.2 A Form Processing Servlet
2.3 Session Tracking
2.4 An Image Servlet
3. The Servlet Environment
3.1 Inter-Servlet Communication
3.2 Communication with Active Server Resources
3.3 Accessing Passive Server Resources
3.4 Accessing Servlet Resources
3.5 Sharing Data Between Servlets
4. Miscellaneous
4.1 Not Thread-Safe Servlets
4.2 An Application for the Command Pattern
4.3 Client-Side Data with Cookies
4.4 Internationalization
4.5 User Authentication via Sessions
4.6 Relative URLs
4.7 Logging
A. Compiling Servlets
B. Running the Example Servlets with NetForge
C. Servlet Resources on the Internet
D. Glossary
E. Servlet API Changes

            Servlet Essentials 1.3.5