I am using HttpSessionListener and works fine. But problem is when I compile my project I have to remove it from web.xml as compilation fails. I am using JDeveloper . This is first entry in my web.xml file.
<?xml version = '1.0' encoding = 'windows-1252'?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd"> <web-app> <listener> <listener-class> OLDCSessionListener</listener-class> </listener> <listener> <listener-class> OLDCSessionAttributeListener</listener-class> </listener> Any help will be appreciated. Thanks -----Original Message----- From: Craig McClanahan [mailto:[EMAIL PROTECTED] Sent: Monday, February 14, 2005 4:43 PM To: Leon Rosenberg Cc: Struts Users Mailing List Subject: [SPAM] - Re: Caching Appliction Level Data? (session listener) - Email has different SMTP TO: and MIME TO: fields in the email addresses 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]