Hi,
what's about the following:
Code:
public void onButtonAction(javax.faces.event.ActionEvent event)
{
m_trigger.trigger();
final HttpSession sessionToBeClosed = HttpSessionAccess.getCurrentHttpSession();
HttpSessionAccess.getCurrentDialogSession().addListener(new ISessionAbstractionListener()
{
@Override
public void reactOnClosed()
{
try
{
sessionToBeClosed.invalidate();
}
catch (Throwable t)
{
t.printStackTrace();
}
}
});
}
You send the redirect in a valid session. Due to the re-direct the client will notify the server that the current dialog session (the one that belongs to your browser-tab) is closed. In the closing of the dialog session you embed the code to close the http-session
(I assume you work with session-tracking "COOKIE", so there is a http session spanning one or more browser tabs, and there is one dialog session per browser tab. - Of course invalidating the http session will also affect other browser tabs that are started in parallel to the one that you start the invalidation from.
Kind regards! Björn