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 |
Explain the difference between forward and sendredirect?
Can we write java code in jsp?
What is out println in jsp?
How can I declare methods within my jsp page?
Is jsp better than servlet?
What is a hidden comment?
How do you delete a cookie within a jsp?
Can you call jsp from servlet?
What is the <jsp:include> standard action?
What is welcome file list?
Why taglib is used in jsp?
How do you import the packages in the JSP?
14 Answers HCL, Hyderabad Central University,