How to create persistent Cookie in servlet (Java) difference between the non-persistent cookie and HttpSession

21 views Asked by At

How to create persistent Cookie in servlet (Java) or both have the same Syntax only And Difference between the non-persistent cookie and HttpSession.

Cookie c = new Cookie("c1",login);//create cookie
response.addCookie(c);//adds cookie with response 

is this the way to create persistent cookie or persistent and non-persistent have the same syntax

0

There are 0 answers