This week's book giveaway is in the Java in General forum. We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line! See this thread for details.
what is the capacity of object that a session can have? session.setAtribute("name",obj); what is the size of the object obj can be? is than any restriction that it should be<4k?
Author and all-around good cowpoke
posted 15 years ago
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. Bill