How many ways to remove the session object in the container
Answer Posted / kishore
Session objects can be removed in three ways.
1> session.invalidate() - will remove all session objects
2> session.removeAtttribute(objName); - will remove the
specified object
3> session.setAtttribute(objName,null); - will remove the
specified object
Is This Answer Correct ? | 6 Yes | 2 No |
Post New Answer View All Answers
Differentiate between get and post?
Can we override destroy method in servlet?
How do you configure a centralized error handler in servlets?
Is it possible to have a constructor inside the servlet?
What exactly are the functions of servlet?
What are the life cycle methods of a servlet?
What are the uses of servlet and what is servlet chaining?
What is the requirement of servlet config and servlet context implemented and how are they implemented?
Whats the advantages using servlets over using CGI?
What are the exceptions thrown by servlets? Why?
Which event is fired at the time of setting, getting or removing attribute from application scope?
Why do we have servlet wrapper classes?
What is the difference between the include() and forward() methods?
Tell us something about servletcontext interface.
What is the dispatcher servlet?