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

What is a javaserver pages (jsp)?

0 Answers  


What is use of scriptlet tags in jsp?

0 Answers  


hi friends...i created sessions in my login page i can able to create a session but after loging out again i can able access the pages by its addresses. i think u may got problem if possible post me small example for login with sessions including database

1 Answers  


What is the difference between include directive and include action?

0 Answers  


What is declaration statement?

0 Answers  






What is out println in jsp?

0 Answers  


How many messaging models do jms provide for and what are they?

0 Answers  


Why is it not necessary to configure standard jsp tags in web.xml?

0 Answers  


Is jsp compiled?

0 Answers  


Can we write a class inside Jsp?

1 Answers  


How to retrieve warnings?

0 Answers  


How is scripting disabled?

0 Answers  


Categories