Re: Session listener

2005-03-15 Thread Giuseppe Briotti
 ==
 Date: Mon, 14 Mar 2005 17:09:35 -0600 (CST)
 From: Christian Rebollar [EMAIL PROTECTED]
 To: Tomcat Users List tomcat-user@jakarta.apache.org, [EMAIL PROTECTED]
 Subject: Re: Session listener
 ==
 
 I don't know, but when I closed the browser the
 listener class catch sessionDestroyed event.

How do you close the browser? By a link on the page itself?
By closing the window?

G.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Session listener

2005-03-14 Thread Ben Souther
How could weblogic know that you closed your browser?


On Mon, 2005-03-14 at 17:57, Christian Rebollar wrote:
 I used weblogic and HttpSessionListener interface, and
 when I closed browser weblogic invalidated the session
 and the listener class catch it, but with tomcat
 didn't happen the same, the session died until
 timeout. There is a way to do it or it can't be done??
 
 thx
 
 _
 Do You Yahoo!?
 La mejor conexin a internet y 25MB extra a tu correo por $100 al mes. 
 http://net.yahoo.com.mx
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Session listener

2005-03-14 Thread Christian Rebollar
I don't know, but when I closed the browser the
listener class catch sessionDestroyed event. 

--- Ben Souther [EMAIL PROTECTED] wrote:
 How could weblogic know that you closed your
 browser?
 
 
 On Mon, 2005-03-14 at 17:57, Christian Rebollar
 wrote:
  I used weblogic and HttpSessionListener interface,
 and
  when I closed browser weblogic invalidated the
 session
  and the listener class catch it, but with tomcat
  didn't happen the same, the session died until
  timeout. There is a way to do it or it can't be
 done??
  
  thx
  
 

_
  Do You Yahoo!?
  La mejor conexión a internet y 25MB extra a tu
 correo por $100 al mes. http://net.yahoo.com.mx
  
 

-
  To unsubscribe, e-mail:
 [EMAIL PROTECTED]
  For additional commands, e-mail:
 [EMAIL PROTECTED]
  
  
 
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 

_
Do You Yahoo!?
La mejor conexión a internet y 25MB extra a tu correo por $100 al mes. 
http://net.yahoo.com.mx

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: session listener not listening

2004-07-16 Thread Shapira, Yoav

Hi,
Are you sure that page you are accessing creates a session? ;)

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Stephen Charles Huey [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 15, 2004 7:06 PM
To: Tomcat User
Subject: session listener not listening

My session listener doesn't seem to be listening.  At the top of my
web.xml (before any servlet elements, and I have nothing like a filter
or anything else before it), I have this:

listener
   listener-classcentral.OurSessionListener/listener-class
/listener





Here is my listener class:


package central;

import java.util.HashMap;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;

import wwxchange.utility.*;
import wwxchange.beans.*;

public class OurSessionListener implements HttpSessionListener {

  public void sessionCreated(HttpSessionEvent se) {
HttpSession session = se.getSession();
UserAcctBean user = (UserAcctBean)
session.getAttribute(currentuser);
String loginID = user.getLoginID();
System.out.println(Added session:  + session.getId() +  for user
 + user.getLoginID());
SystemControl.addActiveUser(session.getId(), user.getLoginID() );
  }

  public void sessionDestroyed(HttpSessionEvent se) {
HttpSession session = se.getSession();
SystemControl.removeActiveUser(session.getId());
System.out.println(Removed session:  + session.getId());
  }
}


My SystemControl's static HashMap doesn't seem to be getting updated,
and the above methods aren't even getting called because nothing is
going to stdout when I log in as different users.

What am I doing wrong?  Is my listener not registered to listen?

Thanks,
Stephen

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: session listener not listening

2004-07-16 Thread Stephen Charles Huey
I'm trying to add this session listener to a production site that often
has over 2,000 concurrent users (according to the Tomcat manager app). 
As far as I can tell, a session is created as soon as you log in because
the very first JSP is accessing a bunch of session beans.  However, my
listener doesn't seem to be listening!  


- Original message -
From: Shapira, Yoav [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Date: Fri, 16 Jul 2004 08:51:47 -0400
Subject: RE: session listener not listening


Hi,
Are you sure that page you are accessing creates a session? ;)

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Stephen Charles Huey [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 15, 2004 7:06 PM
To: Tomcat User
Subject: session listener not listening

My session listener doesn't seem to be listening.  At the top of my
web.xml (before any servlet elements, and I have nothing like a filter
or anything else before it), I have this:

listener
   listener-classcentral.OurSessionListener/listener-class
/listener





Here is my listener class:


package central;

import java.util.HashMap;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;

import wwxchange.utility.*;
import wwxchange.beans.*;

public class OurSessionListener implements HttpSessionListener {

  public void sessionCreated(HttpSessionEvent se) {
HttpSession session = se.getSession();
UserAcctBean user = (UserAcctBean)
session.getAttribute(currentuser);
String loginID = user.getLoginID();
System.out.println(Added session:  + session.getId() +  for user
 + user.getLoginID());
SystemControl.addActiveUser(session.getId(), user.getLoginID() );
  }

  public void sessionDestroyed(HttpSessionEvent se) {
HttpSession session = se.getSession();
SystemControl.removeActiveUser(session.getId());
System.out.println(Removed session:  + session.getId());
  }
}


My SystemControl's static HashMap doesn't seem to be getting updated,
and the above methods aren't even getting called because nothing is
going to stdout when I log in as different users.

What am I doing wrong?  Is my listener not registered to listen?

Thanks,
Stephen

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential,
proprietary and/or privileged.  This e-mail is intended only for the
individual(s) to whom it is addressed, and may not be saved, copied,
printed, disclosed or used by anyone else.  If you are not the(an)
intended recipient, please immediately delete this e-mail from your
computer system and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: session listener not listening

2004-07-16 Thread Stephen Charles Huey
One other thing:  most of our web app's Java classes are put into a
single JAR file in JBuilder that we then dump into Tomcat's common\lib
directory.  However, we have to put our servlets individually into
Tomcat's common\classes directory.  My session listener class gets
compiled into the JAR file with all of the other classes in that central
package (see below), so I was wondering if perhaps this session listener
class needed to be dropped individually into the same place as where the
servlets go, and I've tried that (I've even tried making sure the class
was also dropped into a directory in common\lib\central in case that's
what it needed).  However, this still isn't working for me!  At least,
sessionCreated and sessionDestroyed never seem to be called, according
to my print statements (and the static methods they call don't seem to
be updating my session HashMap).  


- Original message -
From: Stephen Charles Huey [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Date: Fri, 16 Jul 2004 11:41:53 -0500
Subject: RE: session listener not listening

I'm trying to add this session listener to a production site that often
has over 2,000 concurrent users (according to the Tomcat manager app). 
As far as I can tell, a session is created as soon as you log in because
the very first JSP is accessing a bunch of session beans.  However, my
listener doesn't seem to be listening!  


- Original message -
From: Shapira, Yoav [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Date: Fri, 16 Jul 2004 08:51:47 -0400
Subject: RE: session listener not listening


Hi,
Are you sure that page you are accessing creates a session? ;)

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Stephen Charles Huey [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 15, 2004 7:06 PM
To: Tomcat User
Subject: session listener not listening

My session listener doesn't seem to be listening.  At the top of my
web.xml (before any servlet elements, and I have nothing like a filter
or anything else before it), I have this:

listener
   listener-classcentral.OurSessionListener/listener-class
/listener





Here is my listener class:


package central;

import java.util.HashMap;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;

import wwxchange.utility.*;
import wwxchange.beans.*;

public class OurSessionListener implements HttpSessionListener {

  public void sessionCreated(HttpSessionEvent se) {
HttpSession session = se.getSession();
UserAcctBean user = (UserAcctBean)
session.getAttribute(currentuser);
String loginID = user.getLoginID();
System.out.println(Added session:  + session.getId() +  for user
 + user.getLoginID());
SystemControl.addActiveUser(session.getId(), user.getLoginID() );
  }

  public void sessionDestroyed(HttpSessionEvent se) {
HttpSession session = se.getSession();
SystemControl.removeActiveUser(session.getId());
System.out.println(Removed session:  + session.getId());
  }
}


My SystemControl's static HashMap doesn't seem to be getting updated,
and the above methods aren't even getting called because nothing is
going to stdout when I log in as different users.

What am I doing wrong?  Is my listener not registered to listen?

Thanks,
Stephen

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential,
proprietary and/or privileged.  This e-mail is intended only for the
individual(s) to whom it is addressed, and may not be saved, copied,
printed, disclosed or used by anyone else.  If you are not the(an)
intended recipient, please immediately delete this e-mail from your
computer system and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]