Thanks a lot,
Erez

-----Original Message-----
From: Jones, Marty B. [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 05, 2003 3:03 PM
To: Struts Users Mailing List
Subject: RE: Sessions and ActionForm

See answers below:

-----Original Message-----
From: Erez Efrati [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 05, 2003 8:58 AM
To: 'Struts Users Mailing List'
Subject: Sessions and ActionForm


I have a registration wizard where I have a RegForm bean on the session
scope. Now if on the second page I decide to quite and I close the
browser (MS IE), and I open a new IE browser, and I go to registration,
the same form is there containing all the information that I entered in
the previous session. 

1) Doesn't a session ends (invalidates) once I close the browser?
        No, The session will stay valid until the webcontainer
invalidates
it or you programatically invalidate it.  Most webcontainers have a
default
timeout
      value.
2) What is the best way to handle such situation of needing the
registration form always empty? The only thing that comes to my mind is
on the RegAction?method=init remove the RegForm from the session and
recreate a new one instead, or just call reset on the one that is there
on the session context. Will that work?
        
        I think that your action will know when you are coming into the
registration view for the first time so you can reset your actionform or
re-create one.

Thanks,
Erze 



---------------------------------------------------------------------
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]




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

Reply via email to