Introduction: Web applications
You create a Web module by assembling servlets, JavaServer Pages (JSP) files, and static content such as HyperText Markup Language (HTML) pages into a single deployable unit. You can then deploy the Web module as a stand-alone Web application, or combine it with other modules to create J2EE applications.
Whichever application type you deploy, you have the option of activating the Session Manager for your Web module. By using this service to manage HTTP sessions, one can personalize Web pages for individual users. A session is a series of requests to a servlet, originating from the same user at the same browser. Managing HTTP sessions allows servlets running in a Web container to keep track of individual users.
For example, a servlet might use sessions to provide "shopping carts" to on-line shoppers. Suppose the servlet is designed to record the items each shopper indicates he or she will purchase from the Web site. It is important that the servlet be able to associate incoming requests with particular shoppers. Otherwise, the servlet might mistakenly add choices of Shopper 1 to the cart of Shopper 2.