Why setMaxAge() and getMaxAge() methods are used in Cookies?
Answer Posted / abhijitbaji
setMaxAge(), this function sets the maximum age of the
cookie.
The value of the maximum age is the lifetime of the cookie
in seconds.
It is a decimal non-negative integer.
When the age is greater than seconds of maximum age, the
client SHOULD discard the cookie.
A value of zero means the cookie SHOULD be discarded
immediately.
getMaxAge(), this function can be used to retrieve the
maximum age of the cookie.
| Is This Answer Correct ? | 10 Yes | 1 No |
Post New Answer View All Answers
Hi frnd can i any one kindly can post for me portlet,hibernate and spring example application and with flow explantion configuration using Jdeveloper.and related links ar tutorials kindly please send me .its urgent for me .thanks in advance...........else can any one send to kondaiah.goddeti@gmail.com
Are Servlets Thread Safe? How to achieve thread safety in servlets?
What is difference between the HTTP Servlet and Generic Servlet? Explain about their methods and parameters?
Write the code to get the server information in servlet.
What is the difference between a generic servlet and http servlet?
What is difference between GenericServlet and HttpServlet?
Does servlet have main method?
How do you load an image in a Servlet?
What is string tokenizer?
What is the purpose of dispatcherservlet properties?
What is called Scriptlet?
What are common tasks performed by Servlet Container?
Why servlet is used as controller ? Not JSP? I want complete explation?
What are the steps involved in placing a servlet within a package?
Why doesn’t a servlet include main()? How does it work?