Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Session Attributes Disappear!!  RSS feed

 
S Zaidi
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are experiencing this really weird phenomenon. We are working on a J2EE application that uses Tomcat 4.1.18 and runs on a Windows 2000 Server.
We are getting a lot of Null Pointer Exceptions on the production side and when we look at Tomcat logs, we notice that a lot of these errors stem from retrieving null attributes from the session. I know for sure that those attributes ought to have values when put in the session and there is no place else they are removed or overwritten unless you leave/cancel the screen. But from one method to another some attributes from the session object vanish in the thin air??

Here are my questions:
- Is this possible that a session object looses attributes on its own?
- Is there a Tomcat setting for the size of the session object? => meaning
when the session object becomes heavier then that size, Tomcat randomly
removes certain attributes from such a session object.

Note: None of the sessions are shared. Each concurrent user operates with his own browser session and there is no sharing. We are not using any threads or synchronized programs either.

Any help would be highly appreciated. And if any of you have more questions we would be happy to provide more information.

Thanks.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If your user's browser has session cookies disabled, they may be starting a new session with every hit.
 
S Zaidi
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ben,
But in that case the whole session object should disappear and not certain attributes from the session object. By the way how do I check this setting?
 
S Zaidi
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In IE under Internet Options | General Tab | Temporary Internet Files | Settings we have:

- Every Visit to the Page

as the selected option.
 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"SMZ"-
Welcome to the JavaRanch! Please adjust your displayed name to meet the

JavaRanch Naming Policy.

You can change it

here.

Thanks! and welcome to the JavaRanch!

Mark
 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SMZ, please refrain from cross-posting your questions. This same question was posted in Java In General and the Apache/Tomcat forums. I am going to have the other two removed, and will keep the one here in Servlets, since there are responses here.

Thanks.

Mark
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!