Kevin Maeer wrote:
Hi,

I'm using ActionMessages stored in the session to display messages on a page and
everything works splendidly except that the messages never get removed from the
session so every time the user re-enters the page old messages get redisplayed.
After a bit of digging around, this appears to be because I am using my own keys
(instead of Globals.MESSAGE_KEY and Globals.ERROR_KEY) so the RequestProcessor's
processCachedMessages method doesn't clear out the messages.

How have other people got around this? Is the simplest/cleanest option to
subclass RequestProcessor and override the processCachedMessages method to
remove any attribute that is an instance of ActionMessages and that has
isAccessed() = true?

We're using Struts 1.2.7.

The simplest options would seem to be not to store messages in a non-standard place, so the standard clean-up will work... If you can explain why you're doing that, maybe we can suggest an alternative approach.

Failing that, your solution sounds like it should be workable -- provided you have a fixed / constrained set of session scope keys to clean up.

L.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to