How can the session in servlet be destroyed?



How can the session in servlet be destroyed?..

Answer / Sanjit Choudhary

A session in a servlet can be manually destroyed by calling the invalidate() method on the HttpSession object. By default, sessions are time-bound and will automatically expire after a specified period of inactivity.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Servlets Interview Questions

What do you mean by mime type?

1 Answers  


What are different Authentication options available in Servlets.

1 Answers  


What is the inter-servlet communication?

1 Answers  


Should I override the service() method?

1 Answers  


What is a servlet-to-servlet communcation?

1 Answers  


What do you mean by servlet context?

1 Answers  


What is the use of request dispatcher interface?

1 Answers  


What is called Scriptlet?

1 Answers  


What are different ways for authentication of servlet?

1 Answers  


What is forward() and include() of servlets RequestDispatcher interface?

6 Answers   HCL,


What are the annotations used in servlet 3?

1 Answers  


What is Server-Side Includes?

1 Answers   IBM, SAS,


Categories