• 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

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