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-class>central.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]

Reply via email to