Sr.Java Web Developer Question:
Download Questions PDF

Tell me how to delete a Cookie in a JSP?

Answer:

The following code explain how to delete a Cookie in a JSP :

Cookie mycook = new Cookie("name1","value1");
response.addCookie(mycook1);
Cookie killmycook = new Cookie("mycook1","value1");
killmycook . set MaxAge ( 0 );
killmycook . set Path ("/");
killmycook . addCookie ( killmycook 1 );

Download Sr.Java Web Developer Interview Questions And Answers PDF

Previous QuestionNext Question
Tell me what are the reasons for a page not found error and how will you sort it out?Do you know what is a Spring?