O'Reilly logo

Building Scalable and High-Performance Java™ Web Applications Using J2EE™ Technology by Greg Barish

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Servlets and Session Management

Earlier I suggested that servlets are best used as interactive session managers. To understand this a little better, we need to discuss session management in more detail.

Simply put, session management is the idea of associating a series of activities with a distinct end user. For example, if we're deploying an online bookstore, a session might be composed of the following activities:

  1. User logs in.

  2. User searches for mystery books.

  3. User investigates a new book by Philip Margolin.

  4. User purchases the book.

  5. User searches for new Java books.

  6. User logs out.

Thus, a session is a series of activities that may contain zero or more transactions or, more to the point, a session is the logical use of an application by a client. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required