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

tomcat 5.0 session related problem

 
vianyrajnish rajnish
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,

I have created a small application , which counts the total number of users entered the application(TU), and total current users(CU).

logic is:
I have created 2 context attributes - TU and CU initialized to zero.
and 1 session attribute with username -- "user"
When the user login,i am writing a listner class with overridden method sessionCreated(HttpSessionEvent). Within this method reading the CU and TU ,
and increment it by one.

testing: I will open one browser and make user to login. At that time CU and TU is incremented to 1.
I open onather browser and make one user to login... according to logic CU and TU should increment to 2, but it in not incrementing .why?

when I see the log...it is just replacing the attribute "user" with new user login instead invoking the sessionCreated() method. [ using listeners ]

And the same program i tried with other computer .. its working fine.

Please suggest me ....something whether is it problem with Tomcat in handling the request{session in tomcat 5.0 ..are they fixed in next version}?

vinay rajnish
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How are you opening the second browser?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic