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

What is a WeakHashMap in Java ?

How Will You Define the Scope of a Bean in Spring ?

What are the Main Uses of Spring MVC Module ?

How Will You Sort Objects by Natural Order in a Java List ?

What is the Difference Between a Cookie and a Session Object in J ...