Answers

Question and Answer:

  Home  Sr.Java Web Developer

⟩ Tell me how to delete a Cookie in a JSP?

The following code explain how to delete a Cookie in a JSP :

Cookie mycook = new Cookie("name1","value1");

response.addCookie(mycook1);

Cookie killmycook = new Cookie("mycook1","value1");

killmycook . set MaxAge ( 0 );

killmycook . set Path ("/");

killmycook . addCookie ( killmycook 1 );

 124 views

More Questions for you: