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 the use of session management?

0 Answers  


What do you know about jsp tags? Explain how you understand the action tag and jsp action elements.

0 Answers  


Which is mandatory in tag in jsp?

0 Answers  


What’s the difference between forward and sendredirect?

0 Answers  


What is asp and jsp?

0 Answers  






What is tld file?

0 Answers  


Can init method be overridden?

1 Answers   IBM,


Why is it that JComponent have add() and remove() methods but Component doesn’t?

0 Answers  


What is context url?

0 Answers  


what is social transformation system? any site reference? How i get requirement gathering about for it? i wanna build website on this topic

0 Answers  


What is application in jsp?

0 Answers  


What are the life-cycle methods for a jsp?

0 Answers  


Categories