This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Servlets and the fly likes Session Object Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Session Object" Watch "Session Object" New topic
Author

Session Object

Bharatesh H Kakamari
Ranch Hand

Joined: Nov 09, 2000
Posts: 198
In a Session Object when I use the setAttribute method how much of data or how many objects can I store in a session object.
Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4340
    
    2

hmm. I dont know. I used putValue();
instead I am unfamiliar with setAttribute()
can anyone explain the difference to me?


SCJP
Visit my download page
Peter den Haan
author
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
Originally posted by Randall Twede:
hmm. I dont know. I used putValue();
instead I am unfamiliar with setAttribute()

putValue() has been deprecated in v2.2 of the Servlet spec. setAttribute() is a straightforward replacement of it. Ditto getValue() and removeValue() versus getAttribute() and removeAttribute().
Regarding the original question, there is no fixed limit to the number and size of objects you store in the session. Of course, your application will need lots of iron if your session-bound objects are many and/or bulky.
24/7 environments typically use clustering with session fail-over, which implies that everything you bind to the session is replicated into a safe location. Therefore there may be more overhead to storing something in the session than you might realise.
- Peter

[This message has been edited by Peter den Haan (edited March 08, 2001).]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Session Object
 
Similar Threads
Session Size in Servlets
session listener
Session Attributes Disappear!!
What is in the Session?
size of session