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 is preinitialization of a servlet?

0 Answers  


What are the types of ServletEngines?

1 Answers  


What methods do we use in Servlet to Applet communication?

3 Answers   Infosys,


What is the difference between portlet and servlet?

0 Answers  


Explain the methods of request dispatcher in servlet?

0 Answers  






Tell us something about servletcontext interface.

0 Answers  


What must be implemented by all servlets?

0 Answers  


Once the destroy() method is called by the container, will the servlet be immediately destroyed? What happens to the tasks(threads) that the servlet might be executing at that time?

0 Answers  


we cant Override Jsp Service method?Why?

4 Answers   Infrasoft, Mind Tree,


What are the life cycle methods of the servlet?

0 Answers  


What exactly is a servlet?

0 Answers  


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

0 Answers  


Categories