ITeye博客

HttpSessionListener和HttpSessionAttributeListener

androider · 2007-12-04 19:18 · Markdown

public interface HttpSessionListener extends java.util.EventListener Implementations of this interface are notified of changes to the list of active sessions in a web application. To receive notification events, the implementation class must be configured in the deployment descriptor for the web application

void sessionCreated(HttpSessionEvent se) Notification that a session was created. void sessionDestroyed(HttpSessionEvent se) Notification that a session is about to be invalidated.

HttpSessionAttributeListener监听 HttpSession中的属性的操作。当在Session增加一个属性时,激发attributeAdded(HttpSessionBindingEvent se) 方法;当在Session删除一个属性时,激发attributeRemoved(HttpSessionBindingEvent se)方法;当在Session属性被重新设置时,激发attributeReplaced(HttpSessionBindingEvent se) 方法。

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。