How to set a cookie that is persisted only for the duration
fo the clients session?



How to set a cookie that is persisted only for the duration fo the clients session?..

Answer / janet

if u donot explicitly set a life time for the cookie using
cookie.setMaxAge(),the cookie is automatically deleted when
the user closes his browser.

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More Servlets Interview Questions

What are the Internal servlets maintained by the web server?

1 Answers   Infosys,


I Have A Plan to develop a Project in Struts,I want the template of struts project with Hibernate.Canany body provide me the required information?

0 Answers   IBM,


Is there any differance b/w getting servlet context from servlet config and session? if yes then what is that?

7 Answers  


What are the new features added to servlet 2.5?

0 Answers  


How do we translate jsp?

0 Answers  






How do you design microservices?

0 Answers  


Difference between jakarta tomcat and apache Tomcat?

4 Answers   IBM,


Given the request path below, which are context path, servlet path and path info?

0 Answers  


What do you mean by deployment descriptor?

0 Answers  


When the methods init() and Distroy() will be called?

2 Answers  


Name the webserver that is used to run Servlets?

5 Answers  


What are the advantages of servlets over traditional cgi?

0 Answers  


Categories