This was originally posted to the struts-user list, but Ted Husted pointed
out that I should better discuss this on the development list.
For the guys that are not listening to the user list, the background: We
have written a wizard for a larger input process that requires some steps.
We use one ActionForm bean for this wizard that keeps the data in the
session context (everything done by struts). When I wanted to go to the next
step I recognized that all my data from the previous steps was lost and
instead I had the default values. Obviously a session timeout occured and
the original ActionForm was removed. Then a new session was automatically
created and a new ActionForm bean was automatically added to the session
context. Normally this is nice, but there was no way for my Action class or
JSP to see that in fact the session was lost and the data was wrong.
Now I would recommend to place a method like processSession() at the start
of the process() method in the ActionServlet. This could be changed by
subclasses of the ActionServlet in order to intercept session creation and
deprecation. OR it should call some more specialized class for this (say
SessionManager). The advantage of this approach would be that we could also
introduce a new <page:init> tag that calls the same class in order to
intercept session creation in JSP pages (that might be called directly).
If the list decides that this could be nice, I would make the changes but
then I need to know how I can submit them :-)
What do you think?
Andreas
------------------------------------------------------------------------
Andreas Prohaska Mail: [EMAIL PROTECTED]
Apeiron GmbH Tel : +49 (089) 278257-40
Hohenzollernstr. 81 Fax : +49 (089) 278257-49
80796 Muenchen
------------------------------------------------------------------------