: June 6, 2003 2:40 PM
To: Tomcat Users List
Subject: Clear user session
Hi All,
I just moved my webapp from jrun to tomcat. I have a method which clears the
user session. The code snippet is
Enumeration session_var = session.getAttributeNames();
while(session_var.hasMoreElements
Hi All,
I just moved my webapp from jrun to tomcat. I have a method which clears the
user session. The code snippet is
Enumeration session_var = session.getAttributeNames();
while(session_var.hasMoreElements())
{
String key=(String)session_var.nextElement();
I am getting an
Howdy,
Something else is modifying the session (adding/removing attributes or
otherwise modifying the backing collection of your session_var enumeration)
while you're iterating through it.
while(session_var.hasMoreElements())
{
String key=(String)session_var.nextElement();
--
Hi All,
I just moved my webapp from jrun to tomcat. I have a method which clears the
user session. The code snippet is
Enumeration session_var = session.getAttributeNames();
while(session_var.hasMoreElements())
{
String key=(String)session_var.nextElement();
I am
Depending on who you talk to its a bug or not a bug in tomcat.
session.getAttributeNames() returns an Enumeration. Under the covers, the
Enumeration is actually a facade around an Iterator. Iterators are fail-fast
so if you are enumerating through session attributes and make changes, you
get
that works fine.
Anyways I have a fix for that . I am trying to implement it . Thanks a lot
Shyam
- Original Message -
From: Tim Funk [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, June 06, 2003 3:19 PM
Subject: Re: Clear User Session
Depending on who you talk to its
Simple set the element value to null instead of removing it.
-Original Message-
From: Shyama Gavulla [mailto:[EMAIL PROTECTED]
Sent: June 6, 2003 3:28 PM
To: [EMAIL PROTECTED]
Subject: Re: clear user session
--
Hi,
Thanks for the reply. As you have said I was trying to make changes