HttpSession.setMaxInactiveInterval(0) --- Times Out Immediately HttpSession.setMaxInactiveInterval(-1) -- Never Times Out <session-config> <session-timeout>0/-1</session-timeout> -- Never Times Out </session-config>
Cookes.setMaxAge(-1) -- times out when browser exists
Cookes.setMaxAge(0) -- ??? :roll:
SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCEA
posted 12 years ago
Yes, you are right and the answer for the last question is a quotation from the Servlet API:
A zero value causes the cookie to be deleted.
It means, it is deleted on the client side, if there is any cookie on the client side named as the cookie object, you invoked the setMaxAge(...) on.
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads