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
Can you use javascript in servlets?
What's the use of servletcontext?
What are the different ways we can maintain state between requests?
Explain servlet life cycle?
What are advantages of servlets over cgi?
What do you mean by web applications?
What is servlet and list its types?
What is the structure of the http response
What are different methods of session management in servlets?
What is difference between get and post method?
Explains the differences between context.getrequestdispatcher() and request.getrequestdispatcher()?
What's the advantages using servlets than using cgi?
Which httpsession object is used to view and manipulate information about a session?
What is webservlet?
How can a servlet be used to generate plain text instead of html?