How many ways to remove the session object in the container

Answer Posted / ravikiran

1).request.getSession().invalidate();
2).request.getSession.removeAttribute("obj");
3).Adding the following code inside the web.xml
<session-config>
<session-timeout>mins</session-timeout>
</session-config>
4).calling the seMaxInactiveInterval(seconds);

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a cookie What is the difference between session and cookie

597


What is servlet in tomcat?

560


Explain the war file?

612


How the servlet is loaded?

601


What exactly is a servlet?

547






What are the ways to handle multi-threading in servlets?

595


Why HttpServlet class is declared abstract?

649


Is servlet a framework?

543


Explain url encoding in servlet?

582


What do you mean by request dispatcher in servlet? Also explain its methods.

611


What are the functions of Servlet container?

610


What are the different methods of session management in servlets?

541


Why is init() method is used in servlets?

558


What are session variable in servlets?

568


How can we create deadlock situation in servlet?

853