Documente Academic
Documente Profesional
Documente Cultură
• The following table lists the types of HTTP session events, the interface your
event listener class must implement to respond to the event, and the methods
invoked when the event occurs.
• The following useful classes are passed into the listener methods in a listener class:
javax.servlet.http.HttpSessionEvent
provides access to the HTTP session object
javax.servlet.ServletContextEvent
provides access to the servlet context object.
javax.servlet.ServletContextAttributeEvent
provides access to servlet context and its attributes
javax.servlet.http.HttpSessionBindingEvent
provides access to an HTTP session and its attributes
package myApp;
import javax.servlet.*;
public final class mySessionAttributeListenerClass implements
HttpSessionAttributeListener
{
public void attributeAdded(HttpSessionBindingEvent sbe) {
/* This method is called when an attribute
is added to a session. */
}
public void attributeRemoved(HttpSessionBindingEvent sbe) {
/* This method is called when an attribute
is removed from a session. */
}
public void attributeReplaced(HttpSessionBindingEvent sbe) {
/* This method is invoked when an attibute
is replaced in a session. */
}
}
• http://java.sun.com/j2ee/tutorial/1_3-fcs/index.html
• http://www.jcp.org/aboutJava/communityprocess/final/jsr053/
• http://www.google.com