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

no notification from session binding listener

sasikumar palakkizhi
Greenhorn

Joined: Sep 11, 2005
Posts: 29
Hi all,

When i was practising one HttpSessionBindingListener program from HFSJ, I noticed that the listener methods are not called.

The program was to print 'B', when an object of type X is bound to the session and print 'UB', when it is unbound. I added the object of type X two times using the code ( relevant parts shown below ; request, session and pw are Servletrequest,HttpSession and PrintWriter objects).The session attributes with name "sample" has been set in the valueBound and valueUnbound methods for monitoring in the doGet method of the servlet.

INSIDE DOGET METHOD


The code used for X is




Result obtained is


I expected that when i bing "new X()" for the second time to the same key, the first bound object will be removed and the valueUnbound method will be called(as well as valueBound). This is not happening. why?

"System.out.print("B")" ( commented in the question) is not producing any output.

thanks in advance
sasikumar
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: no notification from session binding listener