Hi I know invalidating a session by setting a time-out period in DD-web.xml file but I like to know how to invalidate sessions programmatically?
A:
If in ASP.NET, I think you are looking for HttpSessionState.Abandon().
Canoehead
2010-01-18 15:53:23
DD-web.xml makes me think it's java, not asp.net though.
Michael Stum
2010-01-18 16:02:25
You're probably right. I've edited to indicate ASP.NET. Thanks.
Canoehead
2010-01-18 16:04:04
+3
A:
Not sure if you programm in java, but the hint of the deplyment descriptor web.xml looks like java. In that case try the following steps:
HttpSession session = request.getSession(false); // fetch a reference to the existing session
...
session.invalidate(); // invalidates this session and unbinds any objects bound to it
vesparun
2010-01-18 16:00:50