Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

session. setMaxInactiveIntervel()

 
Sreeraj G Harilal
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?
 
Rohitt Vermaa
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.
 
Sayak Banerjee
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)
 
Gowher Naik
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic