How many ways to remove the session object in the container

Answer Posted / sekhar babu

To remove the session object .
1. with the help of web.xml
<session-timeout>time in minutes</session-timeout>
2. in programatically
session.setMaxInactiveInterval(time in seconds)

to terminate immediately the session
use session.invalidate()

Is This Answer Correct ?    23 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the lifecycle of a servlet?

508


What mechanisms are used by a Servlet Container to maintain session information?

669


In the servlets, we are having a web page that is invoking servlets ,username and password? which is checks in database? Suppose the second page also if we want to verify

586


What is the difference between portlet and servlet?

514


Explain the servlet context.

602






Name the different ways of session tracking.

571


What is the difference between context parameter and context attribute?

534


How can you run a servlet program?

601


Explain the jar and war files in servlet?

557


Which java application server is the best?

549


What is servlet and its life cycle?

572


Tell the new features added in servletrequest interface i.e. Servlet 2.4

575


How can we upload the file to the server using servlet?

546


What is servlet and how it works?

508


Explain the difference between jsp and servlet?

592