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

Name the webserver that is used to run Servlets?

5 Answers  


What are the steps that are involved in using the httpservlet class?

1 Answers  


What are the types of an http request?

1 Answers  


Can you refresh servlet in client and server-side automatically?

1 Answers  


what is meant by Transaction Isolation Levels?

2 Answers   IBM,


How long do servlets last?

1 Answers  


How do I support both get and post from the same servlet?

1 Answers  


What are the advantages of servlets over traditional cgi?

1 Answers  


What are the uses of servlets?

1 Answers  


How do you deal property files in servlet?

1 Answers  


What is the first statement in jsp page.

7 Answers   L&T,


What is cookie in servlet?

1 Answers  


Categories