Suriya Narayan Vartharajan wrote:
>
> hi
> session object is different from local object...
No, they are not different objects. An object that is stored in a
session and then retrieved by another servlet/method means that the
session and the local variable refer to the SAME object. The local
variable and the container in the session object are different
"variables" (for want of a better word) that refer to the SAME object.
> i will maintain the same value when the putValue function executed...
> if u want to change u have to execute putValue function once again
If you assign a new object reference to the local variable, then that
new object is not referenced by the session, and if you want the new
object to be part of the client's session you must call put() again. If
you call a method on the local reference, and that method causes the
object state to change, then the object referenced by the session is
changed as well because it is the SAME object.
___________________________________________________________________________
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