Hi Sparky,

There is a continue of the thread:

From: java-ee-j2ee-programming-with-passion@googlegroups.com 
[mailto:java-ee-j2ee-programming-with-pass...@googlegroups.com] On Behalf Of 
Victor
Sent: Thursday, October 08, 2009 10:06 AM
To: 'Java EE (J2EE) Programming with Passion!'; derez...@yahoo.com
Subject: [java ee programming] Re: LAB 4005

Use session.setAttribute("attr", "value") in greeting, and you could add 
session.removeAttribute("attr ") in response

It worked for me.

Regards,
Moria
-----Original Message-----
From: java-ee-j2ee-programming-with-passion@googlegroups.com 
[mailto:java-ee-j2ee-programming-with-pass...@googlegroups.com] On Behalf Of 
sparky
Sent: Tuesday, November 10, 2009 11:35 AM
To: Java EE (J2EE) Programming with Passion!
Subject: [java ee programming] Re: LAB 4005


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.



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

Reply via email to