`
androider
  • 浏览: 737398 次
  • 性别: Icon_minigender_1
  • 来自: 苏州
社区版块
存档分类
最新评论

HttpSessionListener和HttpSessionAttributeListener

Web 
阅读更多
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) 方法。



分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics