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

when we will use the SendRedirect method instead of forward.

1 Answers   pspl,


What is an api with example?

0 Answers  


How does the Jsp Expressions works ? What happens at the back?

5 Answers   iFlex, Manhattan,


How To maintain session ..?

3 Answers   TCS,


What is session management in jsp?

0 Answers  






Why jsp is used instead of html?

0 Answers  


what are the tools used in your project , How to ask the answer this question

0 Answers  


What is session tracking in jsp?

0 Answers  


What are the implicit, internal el jsp objects and their differences from jsp objects?

0 Answers  


Explain the jspdestroy() method?

0 Answers  


How can the applets be displayed in the jsp? Explain with an example.

0 Answers  


What is jsp and its uses?

0 Answers  


Categories