| Author |
The method logout() is undefined for the type HttpSession
|
Javed Ansari
Greenhorn
Joined: Jun 20, 2012
Posts: 1
|
|
|
I am trying to invalidate all the sessions by calling HttpSession.logout() in doPost(). I can see this API in a famous servlet book (Coreservlet and Javaserver pages by MartyHall) but in Eclipse it is not able to find out even with the latest JDK 1.7.
|
 |
Sumit Patil
Ranch Hand
Joined: May 25, 2009
Posts: 296
|
|
|
There is no such method in HttpSession
|
Thanks & Regards, Sumeet
SCJP 1.4, SCWCD 5, LinkedIn Profile
|
 |
Sumit Patil
Ranch Hand
Joined: May 25, 2009
Posts: 296
|
|
|
And Welcome to the Ranch
|
 |
Singh Harmeet
Ranch Hand
Joined: Aug 05, 2011
Posts: 114
|
|
|
the login() and logout() method is the servlet 3.0 specification , not the jdk 1.7 specification , and this is not in Httpession , this is ih HttpServletRequest . when we call to the logout() method the session attribute are still in session scope , the session is not invalidate if you want to invalidate session , call to the session invalidate() method.
|
With Regards :-
Harmeet Singh
|
 |
 |
|
|
subject: The method logout() is undefined for the type HttpSession
|
|
|