How to set a cookie that is persisted only for the duration
fo the clients session?
Answer / janet
if u donot explicitly set a life time for the cookie using
cookie.setMaxAge(),the cookie is automatically deleted when
the user closes his browser.
| Is This Answer Correct ? | 2 Yes | 0 No |
What is the purpose of dispatcherservlet properties?
Does servlet have main method?
What are the uses of servlet
What exception should be thrown when servlet is not properly initialized?
When to use doget() and when dopost()?
Is servlet a server side scripting language?
Why setMaxAge() and getMaxAge() methods are used in Cookies?
What is difference between server and servlet?
what is session tracking?what are types of session tracking ?and when to cookies,when to use sessionmanagement,whent use url rewriting technique,plz explain briefly?
How can the session in servlet can be destroyed?
How to invoke a Servlet?
Can we fetch the attributes related to a servlet on a different servlet?