Thursday, January 11, 2007

The HttpSessionBindingEvent

The listener of HttpSessionBindingEvent used for collecting the site user session event. When i wish to count the users online of a web application.

The interface HttpSessionAttributeListener and attributeReplaced method is always called and then i can event.getSession() is return the current session object. So, i can getAttribute to get the current value, and the event.getValue() is the old attribute value returned.

No comments: