How many ways to remove the session object in the container

Answer Posted / amitasite

Programmatically:
1. session.invalidate()
2. session.setMaxInteractiveIntervals(0);

Container will remove session if user is idle more than the
time specified in <session-timeout>time in
minutes</session-timeout> in web.xml

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can we implement a jsp page?

632


Hi frnd can i any one kindly can post for me portlet,hibernate and spring example application and with flow explantion configuration using Jdeveloper.and related links ar tutorials kindly please send me .its urgent for me .thanks in advance...........else can any one send to kondaiah.goddeti@gmail.com

1746


What do you mean by annotations in servlet?

588


Explain servlet life cycle?

620


Is it possible to have a constructor inside the servlet?

554






What’s the use of the servlet wrapper classes??

643


What is servlet? Explain

584


Why is httpservlet declared abstract?

582


What is lazy loading and what is Generic Servlet Class?

611


What is the difference between the getrequestdispatcher(string path) method of javax.servlet.servletrequest interface and javax.servlet.servletcontext interface?

569


What are the drawbacks of cgi?

572


What is Servlets and explain the advantages of Servlet life cycle?

585


How the servlet is loaded?

601


How can we refresh automatically when new data has entered the database?

622


What is meant by a servlet?

606