Servlets and JavaServer Pages (JSP) 1.0: A Tutorial

Table of Contents

  • Accessing the Standard CGI Variables
    • The CGI Variables, Their Meaning, and the Servlet Equivalent
    • Example: Making a Table of All CGI Variables
  • Generating the Response: HTTP Status Codes
    • Overview: Status Codes and Messages
    • Setting Status Codes from Servlets
    • HTTP 1.1 Status Codes and Their Meanings
    • Example: A Search Engine Front End
  • Generating the Response: HTTP Response Headers
    • Overview
    • Common Response Headers and Their Meaning
    • Example: Starting a Long-Running Calculation, Showing Partial Results, and Periodically Updating Display with New Data.
  • Handling Cookies
    • Intro: How Cookies Can Be Used (and Abused)
    • The Servlet Cookie API
    • Some Cookie Utilities
    • Example: A Customized Search Engine Interface
  • Session Tracking
    • Overview of Session Tracking
    • The Session Tracking API
    • Example
  • JavaServer Pages (JSP)
    • Overview
    • Syntax Summary
    • Template Text (Static HTML)
    • JSP Scripting Elements: Expressions, Scriptlets, and Declarations
    • JSP Directives
    • Example using Scripting Elements and Directives
    • Predefined Variables
    • JSP Actions
    • JSP Comments and Character Escaping Conventions


This page is part of my Tutorial on Servlets and JSP. © 1999 Marty Hall. All source code freely available for unrestricted use. Created for for work in the Research and Technology Development Center of the Johns Hopkins University Applied Physics Lab, for courses in the Johns Hopkins Part-Time MS Program in Computer Science, and for various industry seminars and on-site Java short courses.