Are session attributes References to the real object?
posted 14 years ago
HI guys, This is a pretty easy one, but I forget. Okay I have a set of servlets and pages, using struts in this case. On the first servlet, I load an object from a db and then I put that object on a session attribute. Now when I call that attribute from the next servlet, I have the exact object from the first. If make changes in the second servlet to the object, do I need to do setAttribute again? Or does the Session just keep a reference to that object, so as it changes I will always get the latest changes because I made them to the same object?