• 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
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

setMaxInactiveInterval(int interval)

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"A value of 0 or less means that the session will never expire"
ref: SCWCD Exam Study Kit - Manning Publication - pg 124.
Compare:
"A negative number implies that the session will never timeout."
See:SUN SPECS
Do we have an errata for the Manning book on this?
 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Now you messed up two things:
In your session-config parameter in web.xml a value of 0 or less means it never expires. This is valid for all sessions existing in your web app.
But your could also use the method setMaxInactiveInterval on your HttpSession object to set the timeout on a specific user session, there your have to use an int less than 0. This is only for the used session.
So there is no errata, just a little 'hhmmmm?' for the Sun guys, but I think it's a historical problem.
 
Salman Khattak
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks. Looks like another SUN inconsistency!
 
yeah, but ... what would PIE do? Especially concerning this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic