maybe is because the atribute is set to nothing before removed. I am not sure Alfredo
2009/11/10 sparky <jeffrey.dun...@att.net> > > Anand, > > I noticed the same thing. The attributeReplaced method is called > before the attributeRemoved method. Does anyone know why this occurs? > > Thanks, > Sparky > > > On Oct 8, 5:29 am, "Anand A. Parikh" <anand_a_par...@yahoo.com> wrote: > > > > When a session attribute is added/replaced/removed the methods will be > called automatically. > > The homework asks you to add a session attribute in Greeting and remove > it in Response. > > > > But, I noticed that the attributeReplaced() was called when the attribute > was removed. > > > > --- On Wed, 10/7/09, derezone <derez...@yahoo.com> wrote: > > > > From: derezone <derez...@yahoo.com> > > Subject: [java ee programming] LAB 4005 > > To: "Java EE (J2EE) Programming with Passion!" < > java-ee-j2ee-programming-with-passion@googlegroups.com> > > Date: Wednesday, October 7, 2009, 11:19 PM > > > > For this homework • Add another event handler Java source file called > > MyOwnEventListener that implements Http Session Attribute Listener. > > > > the code is as follows: > > public void attributeAdded(HttpSessionBindingEvent se) > > { > > servletContext.log("attributeAdded() method is invoked"); > > } > > > > public void attributeRemoved(HttpSessionBindingEvent se) > > { > > servletContext.log("attributeRemoved() method is > > invoked"); > > } > > > > public void attributeReplaced(HttpSessionBindingEvent se) > > { > > servletContext.log("attributeReplaced() method is > > invoked"); > > > > } > > > > Now the question is : how do I invoke these methods?? Do I need to > > change something in the web pages > > or any extra code in the greeting or response java ? ? > > I have the getSession() code in place. > > > > -- Saludos Alfredo Torres Hab.+58 212 9446304 Cel. +58 416 6118599 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Java EE (J2EE) Programming with Passion!" group. To post to this group, send email to java-ee-j2ee-programming-with-passion@googlegroups.com To unsubscribe from this group, send email to java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en -~----------~----~----~----~------~----~------~--~---