Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > General Computer Discussion > Software > Using session attribute in tomcat

Reply
Thread Tools

Using session attribute in tomcat

 
 
rg_yazdani rg_yazdani is offline
Junior Member
Join Date: Nov 2008
Posts: 2
 
      11-11-2008
Hi there,

I have the following problem in my web application.
I hold userId and roleId as two session attributes when user login, and in each page write userId as active user and check roleId for some work. when user logout, I set these attribute with null.

When two or more users login concurrently or not, in some machines, that's work well but at one of them, attribute value changed.

For example, user X login and after viewing some pages logout and then another user Y login. when user Y want to view pages, in some of them user X is wrote as active user whereas user X has logged out. I don't know why, specially when I see this work well in another machines.

Regards.
 
Reply With Quote
 
 
 
 
rekha rekha is offline
Junior Member
Join Date: Nov 2008
Posts: 4
 
      11-11-2008
instead of setting the attributes to null, just invalidate the session when user does log out.

eg:- session.invalidate();
 

Last edited by rekha; 11-11-2008 at 11:15 AM..
Reply With Quote
 
 
 
 
rg_yazdani rg_yazdani is offline
Junior Member
Join Date: Nov 2008
Posts: 2
 
      11-11-2008
Thanks rekha,

When I use session.invalidate(), problem doesn't clear. I found new thing, when I set Internet Options --> general -->setting --> 'check for newer versions of stored pages' to 'automatically' , problem solved. I want to know how can I control this option from application or tomcat?

Regards.

Quote:
Originally Posted by rekha
instead of setting the attributes to null, just invalidate the session when user does log out.

eg:- session.invalidate();
 
Reply With Quote
 
Michelhardjo Michelhardjo is offline
Junior Member
Join Date: Jan 2012
Posts: 1
 
      01-28-2012
i having the same issue. how to solve this without setting the internet options
'check for newer versions of stored pages'
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Session Timeout problems-web.confg session state and IIS session s =?Utf-8?B?Um9iSEs=?= ASP .Net 4 04-11-2007 04:52 PM
Tomcat servlet problem with session attribute marco Java 2 03-24-2006 11:45 AM
Tomcat JSP session beans not being removed at the end of the session John Smith Java 2 07-15-2004 12:46 PM
Session State - What does it take to establish one single ASP.NET session per "browser session" Jeff Smythe ASP .Net 3 01-02-2004 04:10 AM
servlet/jsp question: tomcat 4 and login (about session, forward and get/set attribute) Mladen Adamovic Java 3 11-16-2003 04:54 PM



Advertisments