Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


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

how to u se in jsp

0 Answers   Google,


How do we catch exception and process it using jstl?

0 Answers  


How can my application get to know when a httpsession is removed?

0 Answers  


Differentiate between include directive and include action.

0 Answers  


What do jsp literals consist of?

0 Answers  






What is the difference between java servlet and jsp?

0 Answers  


How does el search for an attribute?

0 Answers  


How can multiple submits due to refresh button clicks be prevented?

0 Answers  


Is jsp a front end?

0 Answers  


How can I implement a thread-safe jsp page?

0 Answers  


Why don’t we need to configure jsp standard tags in web.xml?

0 Answers  


What is session management in jsp?

0 Answers  


Categories