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

How can you use a servlet to generate a plain text instead of html?

590


Explain the methods of request dispatcher in servlet?

514


How printwriter is different from servletoutputstream?

577


What are the uses of servlets?

619


Which interface must be implemented by all servlets?

791






What is the type of method for sending request from http server?

592


How do I support both get and post from the same servlet?

696


Why do we use sendredirect() method?

546


When servlet object is created?

600


What do you mean by servlet?

715


Describe some assignments that are executed by servlet container?

579


What is the difference between jsp and servlet life cycle?

684


How do cookies work in servlets?

579


What are the advantages of cookies?

628


How can we include static files in the jsp page?

610