The importance of session tracking in servlets and how to maintain persistent information about sessions and users. It covers various session tracking solutions such as cookies, url rewriting, hidden form fields, and java's session tracking api. The document also explains the limitations and advantages of each method.
Download Session Tracking in Servlets: Maintaining Persistent Information and more Slides Computer Science in PDF only on Docsity!
More About Servlets
Session Tracking
Persistent information
• A server site typically needs to maintain two
kinds of persistent (remembered) information:
Information about the session
A session starts when the user logs in or otherwise identifies himself/herself, and continues until the user logs out or completes the transaction (for example, makes a purchase)
Information about the user
User information must generally be maintained much longer than session information (for example, remembering a purchase)
This information must be stored on the server, for example on a file or in a database
Session tracking
HTTP is stateless: When it gets a page request, it has no
memory of any previous requests from the same client
This makes it difficult to hold a “conversation”
Typical example: Putting things one at a time into a shopping cart, then checking out--each page request must somehow be associated with previous requests
The server must be able to keep track of multiple conversations with multiple users
Session tracking is keeping track of what has gone
before in this particular conversation
Since HTTP is stateless, it does not do this for you