• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

session. setMaxInactiveIntervel()

 
Ranch Hand
Posts: 310
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hanumanth Deshmuk's book says if we pass -1 to session.setMaxInactiveIntervel() method, then the session will never expire.

But HFSJ says if pass -1 to the method then the session will invalidate after we close the browser window.

which one is write?

I have another doubt too.
What will happen if specify <session-timeout>-1</session-timeout> in DD?
 
Ranch Hand
Posts: 232
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The specs say that negative value indicates that the session should never timeout.
 
Ranch Hand
Posts: 292
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

But HFSJ says if pass -1 to the method then the session will invalidate after we close the browser window.

which one is write?



Which page is it on?
 
Sreeraj G Harilal
Ranch Hand
Posts: 310
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Page No: 249 (Hand written comment)
 
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check HFS&JSP pno-273 Question no-3 you will get your answer.
 
Sayak Banerjee
Ranch Hand
Posts: 292
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First of all, that's not the setMaxInactiveInterval() method they're talkin' about.... so it's not about sessions...it's about cookies....here they're talkin' about the setMaxAge() method...It says passing -1 as an argument makes the cookie dissapear when the browser exits.

But HFSJ says if pass -1 to the method then the session will invalidate after we close the browser window.


HFSJ does not say that.
[ December 21, 2006: Message edited by: Sayak Banerjee ]
 
Sreeraj G Harilal
Ranch Hand
Posts: 310
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes Sayak, you are right?
I think i became mad.
Thank you everybody.
 
Sayak Banerjee
Ranch Hand
Posts: 292
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As for your other query.....specifying 0 or less in the <session-timeout> element in the DD means the session would never timeout....same result is achieved if you pass -1 to the setMaxInactiveInterval() method
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!