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
What is URL Encoding?
What is servletconfig?
What do you mean by httpservlet?
Explain session tracking and its importance?
Difference between java beans & servlets?
What is Client-Server Computing?
How we can get ip address of client in servlet?
If my browser does not support cookie, and my server sends a cookie instance what will happen?
What are the differences between forward() method and sendredirect() methods?
what is servlet chaining?
What is a server side include (ssi)
Write a program to show the functionality of doget and dopost method?
What is the use of send redirect () method?
how many jsp scripting elements are there and what are those?
What are all the protocols supported by httpservlet?