| Author |
Any Other Techniques other than httpSession
|
Nitin Menon
Ranch Hand
Joined: Jun 13, 2007
Posts: 78
|
|
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
Joined: Jan 10, 2002
Posts: 56168
|
|
|
Without knowing anything about your data or how it is being used, it's impossible to say anything.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Nitin Menon
Ranch Hand
Joined: Jun 13, 2007
Posts: 78
|
|
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
Joined: Jan 10, 2002
Posts: 56168
|
|
|
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
Joined: Feb 24, 2006
Posts: 6588
|
|
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 ?
|
SCJP 6 articles - SCJP 5/6 mock exams - SCJP Mocks - SCJP 5 Mock exam (Word document ) - SCJP 5 Mock exam in Java.Inquisition format
|
 |
Nitin Menon
Ranch Hand
Joined: Jun 13, 2007
Posts: 78
|
|
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
Joined: Mar 22, 2000
Posts: 12266
|
|
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
|
Java Resources at www.wbrogden.com
|
 |
Seetharaman Venkatasamy
Ranch Hand
Joined: Jan 28, 2008
Posts: 5575
|
|
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 ?
|
 |
 |
|
|
subject: Any Other Techniques other than httpSession
|
|
|