How Will You Delete a Cookie in JSP ?

We can use following options to delete a Cookie in JSP...

setMaxAge() : we can set the maximum age of a cookie. After this time period, Cookie will expire and will be deleted.

Header : We can also set the expiry time in header of response. Respone.setHeader(). This will also expire the cookie after specified time period.



You May Interest

How Can Be Read Data From a Form in a JSP ?

What is the Different Type of Tag Library Groups in JSTL ?

What is the Difference Between a Class and an Object in Java ?

Why Java Does Not Support Operator Overloading ?

How Can We Print an Array in Java ?