Answer Posted / balakrishna
cookie is a"small amount of data" that is set by the server
on the client.
we have setmaxAge() for destroy cookie.
1.cookie.setMaxAge(100)-->100 sec
If we set the max age of a cookie to 100 sec,the browser
holds the cookie for 100 sec even if we close the browser.
2.If we set max age value to negative value the browser hold
the cookie till we close the browser.
3.If we use setMaxAge(0) the browser will arase the cookie.
Is This Answer Correct ? | 11 Yes | 0 No |
Post New Answer View All Answers
What is a servlet-to-servlet communcation?
What do you mean by annotations in servlet?
What is URL Encoding?
Can you refresh servlet in client and server-side automatically?
Is that servlet is pure java object or not?
What is context in servlet?
What is called Session Tracking?
What are the types of servlets? Explain
Write a command to get actual path of a servlet to the server?
What are the drawbacks of cgi?
Which event is fired at the time of session creation and destroy?
Which protocol will be used by browser and servlet to communicate
What is cookie in servlet?
What’s the difference between sendredirect and forward methods
What is the purpose of dispatcherservlet properties?