Chapter 8. More About Saving Data

In this chapter

In Chapter 5, "Saving Data Between Requests," you learned how to store data between user requests using a session object. Although there are many uses for the session object, one of the most common uses is storing items for online shopping. When you shop online, you usually browse around the Web site, occasionally clicking an "Add to Shopping Cart" button to signal that you want to buy something. When you are done, you click "Check Out" and fill out your billing information.

The session object is a logical place to keep shopping cart data. You could, of course, keep the data on the client's browser. It can get pretty cumbersome trying to keep up ...

Get Special Edition Using Java™ Server Pages and Servlets now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.