The getValue() method of HttpSessionBindingEvent in above program outputs "Two" not "One". Servlet specification says that this method returns the value of the attribute that has been added, removed or replaced. If the attribute was added (or bound), this is the value of the attribute. If the attribute was removed (or unbound), this is the value of the removed attribute. If the attribute was replaced, this is the old value of the attribute."
Here the old value is "One" but it's returning "Two" which is new value. But if SessionObject class in above program did not implement HttpSessionBindingListener interface, than the output is "One" as expected.
Can anybody explain why this is happening? [ July 09, 2008: Message edited by: kamalakannan kamal ]