i believe that u have to put thebean again in session after setting its name
by:
session.putValue(). only then will its name too be reflected when u do
session.getValue() in another servlet.
rgds.,
komal.
> -----Original Message-----
> From: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Bruce
> Bantos
> Sent: Tuesday, May 04, 1999 8:35 AM
> To: [EMAIL PROTECTED]
> Subject: session basic put/get value question - is this right?
>
>
> I put an object reference into the session with the following code:
>
> session.putValue("mybean", mybean);
>
> I then retrieve the object later in the code to make an addition:
>
> TheBean thebean = (TheBean)session.getValue("mybean");
>
> thebean.setName("this is the bean name");
>
> Now, at this point isn't the bean Name for BOTH thebean AND
> session.getValue("mybean") set to "this is the bean name"? What I
> am asking
> is, does the session.getValue return a reference to the object, or is it
> cloning it and creating a seperate object? I can say that in JRun, the two
> different references above DO NOT refer to the same object.
>
> Thanks
>
> -Bruce
>
> __________________________________________________________________
> _________
> To unsubscribe, send email to [EMAIL PROTECTED] and include
> in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html