aspose file tools*
The moose likes Servlets and the fly likes Stored object becomes null  in session Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Stored object becomes null  in session" Watch "Stored object becomes null  in session" New topic
Author

Stored object becomes null in session

Raj Mohan
Ranch Hand

Joined: Sep 26, 2000
Posts: 73
i am storing an user created object and a vector in session. After some time, i am getting the vector object from session, but the user created object becomes null.
any body knows what is the reason.
regards,
Raj
[ May 30, 2002: Message edited by: Raj Mohan ]
Mohamed Yousuff
Ranch Hand

Joined: Jun 23, 2001
Posts: 73
Make sure that your session object has not timed out. Also while retrieving from the session, ensure that you use the correct key value to retrieve the specified object. The key value should be same which you gave while storing in the session object.
Originally posted by Raj Mohan:
i am storing an user created object and a vector in session. After some time, i am getting the vector object from session, but the user created object becomes null.
any body knows what is the reason.
regards,
Raj
[ May 30, 2002: Message edited by: Raj Mohan ]
Raj Mohan
Ranch Hand

Joined: Sep 26, 2000
Posts: 73
thanks Mohamed.
The key is correct. In fact, i am getting this object some time and after some time, the reference becomes null of this user defined object but i am still getting the vector which i stored in session.
I am running this servlet in IIS integerated with Tomcat. My doubt is how come the vector object is not null but this user defined object is null.
regards
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Stored object becomes null in session