Network Deployment (Distributed operating systems), v8.0 > Applications > Web applications


A session is a series of requests to a servlet, originating from the same user at the same browser.

Sessions allow applications running in a web container to keep track of individual users.

For example, a servlet might use sessions to provide "shopping carts" to online shoppers. Suppose the servlet is designed to record the items each shopper indicates he or she wants to purchase from the website. It is important that the servlet be able to associate incoming requests with particular shoppers. Otherwise, the servlet might mistakenly add Shopper_1's choices to the cart of Shopper_2.

A servlet distinguishes users by their unique session IDs. The session ID arrives with each request. If the user's browser is cookie-enabled, the session ID is stored as a cookie. As an alternative, the session ID can be conveyed to the servlet by URL rewriting, in which the session ID is appended to the URL of the servlet or JSP file from which the user is making requests. For requests over HTTPS or SSL, another alternative is to use SSL information to identify the session. Session tracking using the SSL ID is deprecated in WAS v7. We can configure session tracking to use cookies or modify the application to use URL rewriting.
Session management support
Develop session management in servlets
Task overview: Managing HTTP sessions Concept topic


Search Tips   |   Advanced Search