Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Any Other Techniques other than httpSession

 
Nitin Menon
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I've been using HTTPSession objects in my applications to carry data. I would like to know if there is another technology by which we could handle this functionality. if yes, is it more efficient than using sessions?
Thanks in advance... javascript:emoticon('');
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65225
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Without knowing anything about your data or how it is being used, it's impossible to say anything.
 
Nitin Menon
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Thanks for the reply.
IO don't have any data and i am not facing any situation. it is just for knowledge sake.
i just want to know if there is any way data(variables, objects, or anything that a HTTPSession can hold) can be held for use in any of the pages.
also, is the HTTPSession objects stored in the main memory?

Thanks a lot...!
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65225
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are four scopes: page (for JSPs), request, session and application. Which to use depends upon the situation so without any specifics, impossible to answer.
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:There are four scopes: page (for JSPs), request, session and application. Which to use depends upon the situation so without any specifics, impossible to answer.


You can use the 4 scopes that Bear mentioned. You do not have any specific requirement ?
 
Nitin Menon
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no.
Actually, one of my friends who is just into Java had asked me this doubt.
Even, i know very little.
Thanks for the information.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13074
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is the HTTPSession objects stored in the main memory?


Servlet containers have the option of serializing a session and storing it anywhere they want. Thats why ALL objects having a reference saved in a session should implement Serializable to avoid mysterious failures. Thats also why you should not save references to objects managed by other processes, such as DB connection pools, in sessions.

Bill

 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
William Brogden wrote:Thats why ALL objects having a reference saved in a session should implement Serializable to avoid mysterious failures.


well William, is it mandatory ?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic