*
The moose likes JSP and the fly likes JSP Queries Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "JSP Queries" Watch "JSP Queries" New topic
Author

JSP Queries

Deepak Lal
Ranch Hand

Joined: Jul 01, 2008
Posts: 507

1> What kind of objects are stored in session and what kind of objects are not stored in session ?

2> I have the below snippet of code



When The Going Gets Tougher,The Tougher gets Going
Abimaran Kugathasan
Ranch Hand

Joined: Nov 04, 2009
Posts: 2066

No, it won't be incremented! Check your code please~!


|BSc in Electronic Eng| |SCJP 6.0 91%| |SCWCD 5 92%|
Deepak Lal
Ranch Hand

Joined: Jul 01, 2008
Posts: 507

@Abimaran,
whats the answer for Question 1 and whats your justification for Answer 2
Regards
Deepak
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61624
    
  67

What do you think the answer to (1) is? Please ShowSomeEffort.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12823
    
    5
Contrary to popular usage, objects are not stored in sessions. References to objects are stored in sessions. Using the right words prevents making conceptual errors.

IF the servlet container decides to serialize the session to disk, THEN a copy of the object will be serialized.

Bill
Deepak Lal
Ranch Hand

Joined: Jul 01, 2008
Posts: 507

William Brogden wrote:Contrary to popular usage, objects are not stored in sessions. References to objects are stored in sessions. Using the right words prevents making conceptual errors.

IF the servlet container decides to serialize the session to disk, THEN a copy of the object will be serialized.

Bill


Hi William,
Im unable to understand the answer 1,Could you explain with a example for Answer 1.Im confused.
albert thomsan
Greenhorn

Joined: Oct 18, 2010
Posts: 5
Request,Response such kinds of objects are stored in the session. I think that object's references are not stored in the session. Because I have already used a session in my practicals.


Everything is possibe in the world.You just keep up the hard work and you will get the success.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61624
    
  67

albert thomsan wrote:Request,Response such kinds of objects are stored in the session. I think that object's references are not stored in the session

Incorrect, incorrect and incorrect. Not a great average.

The request and response are not stored in the session, and, when scoped variables are "added" to a session, object references to the objects are stored.
 
 
subject: JSP Queries