• 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

2 Inconsistencies in session-timeout and setMaxInactiveinterval

 
Ranch Hand
Posts: 392
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are 2 inconsistencies in the way the session-timeout tag of the DD and setMaxInactiveInterval() method of HttpSession work :

1. The session-timeout value is specified in minutes, while the setMaxInactiveInterval() method accepts seconds.

2. A session-timeout value of 0 or less means that the session will never expire, while if we want to specify that a session will never expire using setMaxInactiveinterval method, a negative value (not 0) is required.

Is the second statement correct?
I think we can test it and see but what's your answers ?
 
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Correct.
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
setMaxInactiveInterval :
-> A negative time (in seconds) indicates the session should never timeout.
session-timeout :
-> If the timeout is 0 or less (in minutes), the container ensures the default behaviour of sessions is never to timeout.
 
Sandeep Vaid
Ranch Hand
Posts: 392
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks. it's True. i verified it ...
 
reply
    Bookmark Topic Watch Topic
  • New Topic