O'Reilly logo

Special Edition Using Java™ 2 Enterprise Edition by Mark Wutka

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

Storing Data in a session Object

One thing you need to realize when dealing with the Web is that there is no permanent connection between the browser and the Web server. If you have done database programming or socket programming, you are familiar with the concept of a session—an active connection between two participants.

The HTTP protocol used by the browser and the Web server is not session-oriented. When the browser needs a page from the Web server, it opens a connection, retrieves the page, and then closes the connection. Because there is no active connection, the Web server has no idea what is happening on the browser. The browser could crash or the entire client computer could be turned off and the Web server would be oblivious.

That being ...

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