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
When servlet object is created?
Explain the difference between servlet and cgi?
What's the servlet interface?
Explain the difference between jsp and servlet?
What do you mean by web applications? Explain web application directory arrangement?
When should you prefer to use doget() over dopost()?
Differentiate between the web server and application server?
How do you define a servlet?
What is the difference between the http servlet and generic servlet?
Describe some assignments that are executed by servlet container?
What is meant by a servlet?
Name the different ways of session tracking.
List out the difference between ServletConfig and ServletContext?
Which event is fired at the time of setting, getting or removing attribute from application scope?
What is the use of attribute in servlets?