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
Difference between doget and dopost?
What is a servlet engine?
What is http servlet?
What is meant by a web application
How do you invoke a Servlet? What is the difference between doPost method and doGet method?
Write a simple servlet program to print the contents of html.
Explain how to improve Servlet Performance?
What is the difference between jsp and servlet life cycle?
What’s the difference between sendredirect and forward methods
How would you create deadlock on your servlet?
What is httpservlet class?
how the HTML data stored in web server?
What are some advantages of storing session state in cookies?
What is meant by cookies?
What is the directory structure of a war file?