How can a cookie is deleted with JSP?



How can a cookie is deleted with JSP?..

Answer / venkat

<%
Cookie killMyCookie = new Cookie("mycookie", null);
<%-- mycookie is the cookie instance which we have to
delete%>
killMyCookie.setMaxAge(0);
killMyCookie.setPath("/");
response.addCookie(killMyCookie);
%>

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More JSP Interview Questions

Why jsp is used instead of html?

0 Answers  


Can we write a class inside Jsp?

1 Answers  


How can I enable session tracking for jsp pages if the browser has disabled cookies?

0 Answers  


What are the advantages and disadvantages of thread-safe jsp page?

0 Answers  


What is jsp and servlets?

0 Answers  






What is jsp usebean?

0 Answers  


i need the source code for opening a word document in java

0 Answers  


What is a javaserver pages (jsp)?

0 Answers  


What is jsp net?

0 Answers  


What are the different types scripting elements in jsp?

0 Answers  


how can i update the marque in jsp without changing the sourse code

0 Answers  


What is expression language injection?

0 Answers  


Categories