1.

How to delete a cookie using servlet?

Answer»

To delete cookies is very simple. If you want to delete a cookie then you simply need to follow up following three steps:

  • Read an already exsiting cookie and store it in Cookie object.

  • Set cookie age as zero using setMaxAge() method to delete an existing cookie.

  • Add this cookie back into response header.



Discussion

No Comment Found