• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Am I correct ???

 
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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:
 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic