Hello All, I am placing an object containing data retrieved in session for displaying it on multiple screens. When the user clicks on the save button, I need to update the session object (such that I can display the changed data if there is an error for the user), and also have the old object in order to make some comparisons. I have tried placing the same object in session with two different names, but that did not help. Can someone please let me know what I am doing wrong?
It sounds like you are adding 2 entries into your session which actually both reference the SAME java object, i.e. the changes made to the object will be displayed regardless of which key you use to retreive it from the session. You will need to create a COPY of the original object, apply the changes to the copy and then add this copy into the session.
Andy Bowes<br />SCJP, SCWCD<br />I like deadlines, I love the whoosing noise they make as they go flying past - Douglas Adams
Joined: Feb 28, 2001
Thanks Andy... That is what I was doing - putting the same object in session with different names. Copy seems to work.