Hi,
I'm Preparing for OCEJWCD6.0 and while studying the Headfirst I got confused on one question in Chapter 6 - Session Management.
Mock Question no. 9 :
And the answer is F (HttpSessionBindingListener and HttpSessionAttributeListener)
I've configured the HttpSessionAttributeListener and HttpSessionBindingListener in web.xml and HttpSessionAttributeListener is getting called up(It's fine, I got the concept). But for HttpSessionBindingListener, It didn't get called even though i've configured it in web.xml.
In the answers, there is an explanation:
My Question is that When the HttpSessionBindingListener methods :
public void valueBound(HttpSessionBindingEvent event)
public void valueUnbound(HttpSessionBindingEvent event)
get called up?
Code snippet :
Please put your comments on it or correct me if i'm doing something wrong.
I'm Preparing for OCEJWCD6.0 and while studying the Headfirst I got confused on one question in Chapter 6 - Session Management.
Mock Question no. 9 :
And the answer is F (HttpSessionBindingListener and HttpSessionAttributeListener)
I've configured the HttpSessionAttributeListener and HttpSessionBindingListener in web.xml and HttpSessionAttributeListener is getting called up(It's fine, I got the concept). But for HttpSessionBindingListener, It didn't get called even though i've configured it in web.xml.
In the answers, there is an explanation:
because an HttpSessionAttributeListener is notified any time an attribute is added and the value object will also be notified if it implements an HttpSessionBindingListener.
My Question is that When the HttpSessionBindingListener methods :
public void valueBound(HttpSessionBindingEvent event)
public void valueUnbound(HttpSessionBindingEvent event)
get called up?
Code snippet :
Please put your comments on it or correct me if i'm doing something wrong.