Hi

I'm writing our custom internal error handler which is supposed to terminate the current session and create a new one (in order to pass over the locale to the new session).

I've stumbled upon the Session.replaceSession() method which, according to the javadoc, should just exactly do that. But when I call this method, nothing happens. The same session continues to be used and no new session is being created at all?!

I've got it to work by using:

Session newSession = getApplication().newSession(getRequest(), getResponse());
       newSession.setLocale(getSession().getLocale());
       getSession().invalidateNow();
       Session.unset();
       newSession.replaceSession();

But I think there must be something easier... ???!

Thanks

Matt

--
matthias.kel...@ergon.ch  +41 44 268 83 98
Ergon Informatik AG, Kleinstrasse 15, CH-8008 Zürich
http://www.ergon.ch
______________________________________________________________
e r g o n    smart people - smart software


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to