HttpSessionBindingListener only works on an attribute itself (so you
can tell when you get added or removd) -- it's been around since
Servlet 2.0.  I was referring to HttpSessionListener (tells you about
session creations and deletions) and HttpSessionAttributeListener
(tells you about attribute add/remove/replace events).

Craig


On Mon, 14 Feb 2005 22:29:07 +0100, Leon Rosenberg
<[EMAIL PROTECTED]> wrote:
> >
> > * There are also other listeners that you should
> >   explore which are available in this version -- did
> >   you know, for example, that you can be notified
> >   whenever anyone else in your app adds, removes,
> >   or replaces an application or session scope attribute?
> >   (In Servlet 2.4 you can do this for request scope too.)
> 
> You mean something like:
>         <listener>
>                 <listener-class>
>                 ...presentation.util.SessionObjectPrintln
>                 </listener-class>
>         </listener>
> 
> public class SessionObjectPrintln implements HttpSessionBindingListener{
> 
>         public void valueBound(HttpSessionBindingEvent e) {
>                 System.out.println("Value bound:"+e.getName()+",
> "+e.getSource());
> 
>         }
> 
>         public void valueUnbound(HttpSessionBindingEvent e) {
>                 System.out.println("Value unbound:"+e.getName()+",
> "+e.getSource());
> 
>         }
> }
> 
> Tried it with resin 3.0.8 and tomcat 5.0.25,28, neither worked :-(
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to