File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes capacity of session object Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "capacity of session object" Watch "capacity of session object" New topic

capacity of session object

plr kannan

Joined: Jan 15, 2001
Posts: 4
what is the capacity of object that a session can have?
what is the size of the object obj can be?
is than any restriction that it should be<4k?

William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13027
There is no size limit imposed by the HttpSession class - you would be well advised to consider the memory consumption,
and the amount of time the session will hang around in memory.
Some servlet engines will serialize a session out to disk - you must ensure that all of the parts are serializable. You should not store objects that use system resources such as database connections for that reason.

author of:
I agree. Here's the link:
subject: capacity of session object
jQuery in Action, 3rd edition