This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HTTP Session variable

 
Rashmi Trivedi
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All
in my JSP or servlet code, i use Http Session varaible to store user name and use id and thigs like that to verifyt the autorise users.

I was just wondering if there is any limit as to how may variale you can store in Session..Can anybody advise me?

Thanks and regards,
Rashmi Trivedi
 
Muhammad Saifuddin
Ranch Hand
Posts: 1324
Android Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Rashmi Trivedi:

I was just wondering if there is any limit as to how may variale you can store in Session..Can anybody advise me?



There is no limit on the size of information that can be saved in a Session Object. just only limitation of the RAM available on the Server machine.
[ December 10, 2006: Message edited by: Saif uddin ]
 
Muhammad Saifuddin
Ranch Hand
Posts: 1324
Android Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
and see this thread for more clearing up on session
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As the objects that you store in session live in heap , so the amount of data that you can store depends on the number of sessions and the heap size.
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just to clear things up a bit, what Saif and Rahul said are both true, although the way the responded made it appear it might be 2 different answers. ;)

The number of objects you can store in the session is dependent on how much memory you've allocated for the VM. The amount of memory allocated to the VM is dependent on the amount of RAM on the server(s).
[ December 10, 2006: Message edited by: Gregg Bolinger ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic