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

Mention the various implicit objects used in the expression

0 Answers  


What are the two ways to include the result of another page?

0 Answers  


Why do we use jstl tags?

0 Answers  


What is scriptlet in jsp?

0 Answers  


What are the components of jsp?

0 Answers  






why ,what, when, where,how the extended star schema is used.

0 Answers  


How to make a “new line in html” in jsp?

0 Answers  


How to configure init parameters for jsp?

0 Answers  


Why does jcomponent have add() and remove() methods but the component does not?

0 Answers  


Give the use of session object.

0 Answers  


How many tags are provided by jstl?

0 Answers  


What is the use of?

0 Answers  


Categories