O'Reilly logo

Core Servlets and JavaServer Pages™: Volume 1: Core Technologies, 2nd Edition by Larry Brown, Marty Hall

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

Chapter 9. Session Tracking

Topics in This Chapter

  • Implementing session tracking from scratch

  • Using basic session tracking

  • Understanding the session-tracking API

  • Differentiating between server and browser sessions

  • Encoding URLs

  • Storing immutable objects vs. storing mutable objects

  • Tracking user access counts

  • Accumulating user purchases

  • Implementing a shopping cart

  • Building an online store

This chapter introduces the servlet session-tracking API, which keeps track of user-specific data as visitors move around your site.

The Need for Session Tracking

HTTP is a “stateless” protocol: each time a client retrieves a Web page, the client opens a separate connection to the Web server and the server does not automatically maintain contextual information about the 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