Author and all-around good cowpoke
Posts: 13078
posted 20 years ago
The whole idea of sessions is to provide an efficient method for keeping objects between requests and passing them between servlets. Any other solution you come up with would probably be less efficient.
If you are worried about the memory consumed, remember that you can force the session to drop any object reference with removeAttribute(), you don't have to depend on the session timeout mechanism, but it will be there as a final cleanup mechanism.
Bill