How many ways to remove the session object in the container

Answer Posted / shyamalendu prusty

If you are using HTTP Session then you can use
session.remove().
But if you are using some other ways for session management
let’s say cookies then you have to then you can setMaxAge
to zero for the cookie.

Is This Answer Correct ?    5 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Should I override the service() method?

666


What is war file?

578


How do cookies work in servlets?

579


What are the types of servlet?

662


What is ServletConfig object?

606






How to notify an object in session when session is invalidated or timed-out?

628


What are the benefits of using servlet over cgi?

572


How to get the path of servlet in the server?

531


What is difference between jsp and servlet?

641


How printwriter is different from servletoutputstream?

577


What is the difference between portlet and servlet?

510


Can filter be used as request or response?

540


Explain the custom jsp tags and the beans.

615


Differentiate between the get and post method

563


If my browser does not support cookie, and my server sends a cookie instance what will happen?

647