Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

saveMessages and session

 
azhar bharat
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a ActionMessages object in my action class. I save this in a session object using the saveMessages method.

Eveything works fine and the messages are printed in the redireced page.


My question:
What happens to the ActionMessages object which was in session after the messages are printed?
Does it go out of scope?
Does it remain in the session?
 
Ray Stojonic
Ranch Hand
Posts: 326
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's there until: it is replaced, it is removed, or the session times out or is invalidated.
 
Jan Groth
Ranch Hand
Posts: 456
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i can confirm this - it will not be removed from the session until you explicitely delete it.

jan
 
azhar bharat
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
but if i reload the page, the messages are never shown. why is that?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic