File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes More on HttpSessionBindingListener? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "More on HttpSessionBindingListener?" Watch "More on HttpSessionBindingListener?" New topic

More on HttpSessionBindingListener?

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 10031


Any explanation on this type of Listener? like why should we have one such?

SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Arpan Singh

Joined: Aug 10, 2007
Posts: 5
The project I am working in is a web portal and there are several applications been hosted on it. Some of them are J2EE applications while some are still written in ASP and they are just hosted on our portal (request goes to some other URL when you try to access these ASP applications).

We have used this listener for enabling SSO ( single sign on ) as when user logs in to portal we make his credentials go into a database from where these ASP applications can read the credentials and they allow user to access them without doing a 'login' for second time.

When user logs out the listener takes care of deleting the credentials from the table.

SCJP 1.5 (88%)<br />SCWCD 1.4 (95%)<br />SCDJWS (preparation going on...)
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 10031

Fine but do you use HttpSessionBindingListener for this or any other Listener in particular?
Tony Smith
Ranch Hand

Joined: Jul 07, 2007
Posts: 229
First of all do you know what this listener does? Usually it's used for if you want to know the class/object that you created by yourself has been added, removed from a session. It's in page 183 of HFJS.

Just create any class and implements the HttpSessionBindingListener and overwrite the valueBound and unbound methods.
I agree. Here's the link:
subject: More on HttpSessionBindingListener?
It's not a secret anymore!