C
christoph
Hi,
I have a session holding user data of an online survey. When the survey
is completed, all data is written to a result file. After that the
session is manually invalidated (servlet calling the invalidate
method).
If the respondent does not complete the interview the session times out
at some point. I would like to flush the data I have in the session so
far to a special result file.
Is there a way of reacting to session expiration (by the server) and
not to invalidation (by the servlet)?
Using HttpSessionListener.sessionDestroyed(HttpSessionEvent se) does
not work, because the data of HttpSessionEvent.getSession() is not
accessible any more when the event is fired. Furthermore the
HttpSessionEvent is fired when the session expires and when the session
is manually invalidated.
Does anyone have advice?
THX,
Chris
I have a session holding user data of an online survey. When the survey
is completed, all data is written to a result file. After that the
session is manually invalidated (servlet calling the invalidate
method).
If the respondent does not complete the interview the session times out
at some point. I would like to flush the data I have in the session so
far to a special result file.
Is there a way of reacting to session expiration (by the server) and
not to invalidation (by the servlet)?
Using HttpSessionListener.sessionDestroyed(HttpSessionEvent se) does
not work, because the data of HttpSessionEvent.getSession() is not
accessible any more when the event is fired. Furthermore the
HttpSessionEvent is fired when the session expires and when the session
is manually invalidated.
Does anyone have advice?
THX,
Chris