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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Which http method is said to be non-idempotent and idempotent?

604


Can we fetch the attributes related to a servlet on a different servlet?

633


How can you push data from an Applet to a Servlet?

607


What is the servlet?

618


How can we achieve transport layer security for our web application?

567






What is SingleThreadModel interface?

672


How many servlet objects are created?

561


What is servlet and its use?

623


What is servlet and list its types?

542


Why do we have servlet filters?

597


Why the concept of single thread model interface is used?

549


Whether thread can be used in servlets?

728


Explain session tracking and its importance?

544


What are the differences between forward() method and sendredirect() methods?

547


What is difference between jsp and servlet?

644