File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes The method logout() is undefined for the type HttpSession Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "The method logout() is undefined for the type HttpSession" Watch "The method logout() is undefined for the type HttpSession" New topic
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
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: The method logout() is undefined for the type HttpSession
 
Similar Threads
Cant use object from another class
Posting to bump up my count...
WA #1.....word association
The x900 effect ?
Text box value is not being completely filled with request attribute