File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Need some explanation of HttpSessionBinding Listener Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Need some explanation of HttpSessionBinding Listener" Watch "Need some explanation of HttpSessionBinding Listener" New topic

Need some explanation of HttpSessionBinding Listener

Farooq Ali
Ranch Hand

Joined: Sep 30, 2000
Posts: 43
Hi everybody
can some one please tell me about the HttpSessionBinding Listener. & how can I use it in my project.
I am using a servlet which first verifies a user then gets info from a database regarding that user.
Afterwards pass that info to a couple of JSP files.
I had thought of using simple HttpSession object's setAttribute() & getAttribute() methods for the project.
I need some feedback whether I am going on the right track or not??
Thandapani Saravanan
Ranch Hand

Joined: Oct 17, 1999
Posts: 117
HttpSessionBindingListener is an Interface which needs to be implmented by classes of those objects who want to be notified when a session object is created/removed.
Simply, we can write code that gets executed whenever those objects are put/removed into/from session.
As for passing info about the user to subsequent JSP pages, you can use the session mechanism to remember between pages.

It is sorta covered in the JavaRanch Style Guide.
subject: Need some explanation of HttpSessionBinding Listener
Similar Threads
What's the difference between HttpSessionAttributeListener and HttpSessionBinding...
Quick Question HttpSessionBinding vs HttpSessionAttribute Listeners
HttpSessionBinding listener
How to use HttpSessionBinding class
HttpSessionBinding interface