Hi,
I have tested the following code in servletrunner and it is working properly.Destroys the session and creates a new session.
//code
HttpSession session = req.getSession(true);
session.invalidate();
session = req.getSession(true);
session.putValue("Hello","Test");
regards,
Thilak.V
Originally posted by kuaikuai:
//User clicks SWITCH IDENTITY, we are require to abandon
// existing session & switch to new login user
// Code snipplets below
HttpSession session = request.getSession();
if (session != null)
session.invalidate(); // destroy everything on session
// We then require a Total new session
session = request.getSession(true);
In Jrun3, The session above returns the old session which
will throw exception if we call
session.putValue ("Name", "XX");
Anyone can suggest how I can access a new session