-
How to logout
hi,
i've created a HttpSession,
HttpSession sess = req.getSession();
Now using the ServletContext, i'm passing the value of the Session by using the getId(); tru the application. But wheni click on logout, the page redirects to the specified URL, and i've also used the invalidate() method, but the session still is active. If the user uses the back button of the browser the clicks on any other link, it still works. technically it shud trow a msg saying that the " you have been logged out"... here is the code of the LogoutServlet.
HttpSession seescurrent = req.getSession();
if(req.isRequestedSessionIdValid())
{
seescurrent.invalidate();
res.sendRedirect("login.htm");
}
so am i doing sumthing wrong in logout. please help me to use the logout code properly..
Similar Threads
-
By Acceris in forum VB Classic
Replies: 1
Last Post: 12-05-2005, 03:15 PM
-
By Iam5Leo in forum ASP.NET
Replies: 2
Last Post: 04-03-2003, 10:39 AM
-
By Iam5Leo in forum ASP.NET
Replies: 4
Last Post: 03-26-2003, 05:16 PM
-
By Adeel Shamsi in forum Database
Replies: 2
Last Post: 01-26-2001, 04:31 PM
-
By Adeel Shamsi in forum Database
Replies: 0
Last Post: 01-25-2001, 03:53 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks