Why setMaxAge() and getMaxAge() methods are used in Cookies?
Answer Posted / tulasi vani
Cookies are created as
Cookie c=new Cookie(name,value);
c.setMaxAge(milliseconds);
int getMaxAge() returns the maximum age of the cookie.
If the value is set to zero it will be deleted
immediately.If the age is a -ve number it states that the
age of the cookie is confined to that particular request
only.
| Is This Answer Correct ? | 2 Yes | 6 No |
Post New Answer View All Answers
Write a simple servlet program to print the contents of html.
What's the difference between authentication and authorization?
Why do we have servlet filters?
What is a server side include (ssi)
What is the structure of the http response
How httpservlet is different from the genericservlet?
When servlet is loaded?
Can we refresh servlet in client and server side automatically?
Can you refresh servlet in client and server-side automatically?
How to generate the server side programming and the advantages of it over the other languages?
What are the functions of the servlet container?
What are different ways for authentication of servlet?
Explain their methods? Tell me their parameter names also have you used threads in servlet?
What is called servlet container?
What is MIME Type?