1 16 17 package org.apache.tester; 18 19 20 import java.io.*; 21 import javax.servlet.*; 22 import javax.servlet.http.*; 23 24 25 32 33 public class SessionListener03 34 implements HttpSessionActivationListener, HttpSessionBindingListener, 35 Serializable { 36 37 public void sessionDidActivate(HttpSessionEvent event) { 38 event.getSession().getServletContext().log 39 ("SessionListener03: sessionDidActivate(" + 40 event.getSession().getId() + ")"); 41 } 42 43 public void sessionWillPassivate(HttpSessionEvent event) { 44 event.getSession().getServletContext().log 45 ("SessionListener03: sessionWillPassivate(" + 46 event.getSession().getId() + ")"); 47 } 48 49 public void valueBound(HttpSessionBindingEvent event) { 50 event.getSession().getServletContext().log 51 ("SessionListener03: valueBound(" + 52 event.getSession().getId() + "," + 53 event.getName() + ")"); 54 } 55 56 public void valueUnbound(HttpSessionBindingEvent event) { 57 event.getSession().getServletContext().log 58 ("SessionListener03: valueUnbound(" + 59 event.getSession().getId() + "," + 60 event.getName() + ")"); 61 } 62 63 64 } 65 | Popular Tags |