File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes saveMessages and session Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "saveMessages and session" Watch "saveMessages and session" New topic

saveMessages and session

azhar bharat
Ranch Hand

Joined: Jul 17, 2006
Posts: 87
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

Joined: Aug 08, 2003
Posts: 326
It's there until: it is replaced, it is removed, or the session times out or is invalidated.
Jan Groth
Ranch Hand

Joined: Feb 03, 2004
Posts: 456
i can confirm this - it will not be removed from the session until you explicitely delete it.

azhar bharat
Ranch Hand

Joined: Jul 17, 2006
Posts: 87
but if i reload the page, the messages are never shown. why is that?
I agree. Here's the link:
subject: saveMessages and session
It's not a secret anymore!