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. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---