aspose file tools*
The moose likes Servlets and the fly likes HttpSessionBindingListener Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "HttpSessionBindingListener" Watch "HttpSessionBindingListener" New topic
Author

HttpSessionBindingListener

Bob Moranski
Ranch Hand

Joined: Nov 22, 2000
Posts: 177
Hi, I was wondering if anyone knows what a HttpSessionBindingListener is? What does it do?
Thanks!
Preethi Suryam
Ranch Hand

Joined: Nov 17, 2000
Posts: 92
Hi!
HttpSessionBindingListener is an interface.Is causes an object to be notified when it is bound to or unbound from a session. The object is notified by an HttpSessionBindingEvent object.
It has two methods
valueBound(HttpSessionBindingEvent event)
Notifies the object that it is being bound to a session and identifies the session.
valueUnbound(HttpSessionBindingEvent event).
Notifies the object that it is being bound from a session and identifies the session.
GoodLuck!
Preethi
Bob Moranski
Ranch Hand

Joined: Nov 22, 2000
Posts: 177
Hi, how is an object "bound" or "unbound" to a session? Is "binding" done by session.putValue("bound", object)? How does an object get "unbound"?
Thanks.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
An object is unbound from a HttpSession when:
1) the session times out and is destroyed by the servlet engine
-or-
2) the object is removed with removeAttribute.
Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HttpSessionBindingListener