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:
User logs in.
User searches for mystery books.
User investigates a new book by Philip Margolin.
User purchases the book.
User searches for new Java books.
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. ...
Get Building Scalable and High-Performance Java™ Web Applications Using J2EE™ Technology now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.