作用:
可以对对象的属性进行监听、一旦对象发生变化(新增、替换、消除)就可执行相应的操作

监听域对象及相应的接口

这三个监听器的方法

session绑定某个对象
此监听器只有一个HttpSessionBindingListener(绑定、解绑事件)接口,且不需要在web.xml中注册。

jsp中的用法

作用
当用户登录成功时,登录信息存入session的时候出发用户与session的绑定事件、当用户退出是触发解绑事件
可以对对象的属性进行监听、一旦对象发生变化(新增、替换、消除)就可执行相应的操作
当用户登录成功时,登录信息存入session的时候出发用户与session的绑定事件、当用户退出是触发解绑事件
本文标题:Java Web监听器——域对象中属性的创建、替换和消除事件
本文链接:https://www.haomeiwen.com/subject/umudjftx.html
网友评论