Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

about sessions  RSS feed

cyril vidal
Ranch Hand
Posts: 247
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all,
Did you take this very intersting tutorial on ibm developer web site?
building servlets with session tracking
definitely, you should..
I've question about a code snippet from BookmarkServlet, but there's no need to take the tutorial to understand my question (i hope so..)

Well, in this code, we retrieve the BKUser object - bounded to the current session and referenced by user variable - from a JSP page.
All it's ok. in fact, the job of this code is to modify this object, and add it some item, via the addBookmark mesthod().
My question is why the tutorial's author think we need then to explicitly bound a new time the modified object to the session? The object referenced by the variable user , although it has been modified, remains the same and as far as I understand, remains bound to the session.
I've deleted this instruction

and it works well, as expected.
But perhaps I'm wrong and the author (IBM member) knows its job better than me
I would be very grateful for any lignt on this topic,
Thanks in advance,
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!