aspose file tools
The moose likes JSP and the fly likes HTTP Session variable Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "HTTP Session variable" Watch "HTTP Session variable" New topic
Author

HTTP Session variable

Rashmi Trivedi
Ranch Hand

Joined: Aug 13, 2001
Posts: 60
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

Joined: Dec 06, 2005
Posts: 1318

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 ]

Saifuddin..
[Linkedin] How To Ask Questions On JavaRanch My OpenSource
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1318

and see this thread for more clearing up on session
Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2300
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.


Rahul Bhattacharjee
LinkedIn - Blog
Gregg Bolinger
Ranch Hand

Joined: Jul 11, 2001
Posts: 15230

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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HTTP Session variable
 
Similar Threads
Tradeoff using http session/stateless bean and stateful session bean
java application accessing the ejb
Maintaing everthing in Session Object
Store Object in HTTP Session
Session Object