Yes, you can remove the related ActionForm inside the session using the following code inside the "last" Action of the wizard HttpSession session = httpServletRequest.getSession( false ); if ( session != null ) { session.removeAttribute( actionMapping.getName() ); }
But this solution is uncorrect, because if the user doesn't finish the wizard you have the same problem. So, the best way is to use the reset() method inside the ActionForm. BR /Amleto -----Messaggio originale----- Da: Andrew Hill [mailto:[EMAIL PROTECTED] Inviato: venerd́ 14 maggio 2004 12.13 A: Struts Users Mailing List Oggetto: RE: Newbie question: Deleting an ActionForm that is in session scope. Yes, you can just remove the form from the session. Struts will create a new one when its needed. :-) -----Original Message----- From: Adam Lipscombe [mailto:[EMAIL PROTECTED] Sent: Friday, 14 May 2004 18:15 To: [EMAIL PROTECTED] Subject: Newbie question: Deleting an ActionForm that is in session scope. 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? TIA - Adam --------------------------------------------------------------------- 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]