That doesn't seem lika a really a good idea especially if you're keeping
track of the user logged in! invalidate() is used only when a user
clicks log out or if you want something to that effect. 

Just remove the actionform from the session"

Session.removeAttribute("yourActionFormNameDeclaredInTheStrutsConfig")

Regards,
-Yves-


> -----Original Message-----
> From: John Moore [mailto:[EMAIL PROTECTED]
> Sent: Friday, May 14, 2004 6:25 PM
> To: Struts Users Mailing List
> Subject: Re: Newbie question: Deleting an ActionForm that is in
session
> scope.
> 
> Adam Lipscombe wrote:
> 
> >Folks,
> >
> >
> >I have a wizard framework that uses the same ActionForm to collect
data
> as
> >the wizard progresses.
> >The scope of the ActionForm is session so that values are preserved
when
> the
> >user navigates back and forwards through the wizard.
> >
> >When I get to the end of the wizard, I don't want the same data to be
> >displayed next time the user starts the same wizard.
> >Do I just remove the ActionForm from the session attribute list?
> >Or should I leave the Form in the session attribute list and clear
each
> of
> >its fields?
> >Or is either approach OK?
> >
> >
> >
> >
> I don't know what the canonical way of doing this is, but what I do to
> achieve precisely the effect you are after is to invalidate the
session
> in the Action class, after everything's done:
> 
>      req.getSession().invalidate();
> 
> This works for me!
> 
> John
> --
> ==============================================
> John Moore  -  Norwich, UK  -  [EMAIL PROTECTED]
> ==============================================
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


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

Reply via email to