• 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

Session Timeout and SCWCD kit question

 
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

In chapter 8 of SCWCD kit, there is a question, if you don't want your web application session not to time-out ever what you would do ?

Answer is set the session-timeout to 0 or -1 in DD. But i think it should be only -1 not 0.

Please help

Thanks
 
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Spookily, I just looked up that very same thing in the specs.

I'm still a little unsure...

If setting <session-timeout> in DD, the spec says
"If the timeout is 0 or less, the container ensures the default behaviour of sessions is never to time out. If this element is not specified, the container must set its default timeout period."

However, for setting it programatically, it just says
"By definition, if the timeout
period for a session is set to -1, the session will never expire."
No mention of 0.
HFSJ p247 has an example where it sets it to 0 and says "causing the session to timeout immediately".

Would appreciate clarification on this.

MG
 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Setting Session Timeout in DD:

0: session never expires.
-1(negative value): session never expires.
value greater than 0: session expires after that value.


Setting Session timeout programatically:

0: session expires immediately.
-1(negative value): session never expires.
value greater than 0: session expires after that value.

Hope this helps.

Thanks and regards,
Saurabh
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic