SessionDestroyed works, but not sessionCreated!

Any idea why my stdout.log in Tomcat would be recording print statements from sessionDestroyed but not sessionCreated?
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());
}This has been frustrating me for a while. I thought it simply wasn't listening, but apparently it is since I do get statements beginning with "Removed session" in the log file!

serlank is right
sessionCreated method works when the session is being created , how do you have a user object in the session at that time

Similar Messages

Maybe you are looking for

  • Enter condition type several times in a sales order

    Hello Gurus, I have a Pricing Procedures with net price minus some discounts and sales price. This is standard. One of the discount condition types you can enter manually in a sales order. Now my problem. This discount  condition type you can enter s

  • Sending a picture...

    All, When I send an mms picture to someone with out a iPhone they don't see the picture. Does anyone know why this would be happening, or having this problem? Message was edited by: Nade 23

  • Need to know what is CWB

    pls i am new to the following items i have seen on the oracle web site and i am very curious to know what are the functionality below are in real business case: pls assist me Compensation Workbench Create and Maintain Plans Definition, Types & Years

  • Mysterious routing problem / interface determination

    Hi, I have a very very strange routing problem with XI. A message is sent from R/3 to XI and then send via adapter to an external party. The routing is configured well. But sometimes I have the following problem: A message is received by XI (from R/3

  • HT1657 How can I find a specific movie I want to rent in the Itunes store?

    It's easy to find the movies they want me to rent, but how do I find the particular one I am looking for?