Servlet Development Guide : PART III Programming : Chapter 9 Creating Servlets
Chapter 9 Creating Servlets
Introduction
This chapter looks in detail at one of the provided examples, SessionExample, a servlet that maintains state between client requests. The discussion includes the servlet’s design and implementation. In addition, general servlet compiling and deployment is discussed.
The servlet demonstrates techniques for creating and destroying sessions, for storing and retrieving session state, and for creating and processing HTML forms.
The SessionExample servlet presents a single page to the client. The page provides forms that contain controls for requesting changes to the session. As the client manipulates the session, the servlet regenerates the page to display the current session information.
The servlet described in this section is included in the files SessionExample.h and SessionExample.cpp in the examples\servlet directory of the HydraExpress installation. The servlet itself is available at http://localhost:8090/examples/SessionExample on a system running HydraExpress in the default configuration.