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

How to maintain security in servlets?

2 Answers  


What is the difference between doGet and doPost?

9 Answers   iGate,


What is meant by servlet? What are the parameters of the service method?

0 Answers  


Who is responsible to create the object of servlet?

0 Answers  


Explain the different ways for servlet authentication?

0 Answers  






Why is init() method is used in servlets?

0 Answers  


What is ServletContext object?

0 Answers  


What are its drawbacks of cgi?

0 Answers  


What do you mean by url pattern in servlet?

0 Answers  


How do we translate jsp?

0 Answers  


Can you call a jsp from the servlet?

0 Answers  


Is the init(ServletConfig sc) throws IOException or not?

3 Answers  


Categories