i'm trying to build an undo method for an html form submission. the form is submitted and prior to the new data being added to an object, i copy that object to the session. then, i make the changes. when i call the undo method and retrieve that unchanged object from the session, it comes out looking like the changed object...the changes magically copied themselves to the session.
the update and undo functions are both in a servlet...session is passed in via pageContext.
i've written a test.jsp where i have a string x="4", i copy that to the session, set the string x="3" and then grab the string from the session and display it...and get 4. so making a change to the object after copying it to the session shouldn't change the object in the session.
what gives!
i'm at wit's end...
the update and undo functions are both in a servlet...session is passed in via pageContext.
i've written a test.jsp where i have a string x="4", i copy that to the session, set the string x="3" and then grab the string from the session and display it...and get 4. so making a change to the object after copying it to the session shouldn't change the object in the session.
what gives!
i'm at wit's end...