Win a copy of Hands On Software Engineering with Python this week in the Jython/Python forum!
  • 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
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

time out period defined by the servlet container?  RSS feed

 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

In HF Book, page 273 Coffee Cram Chapter 6, i found the following question, i have a doubt of the answer provided, answer A, C as showne below.

How "time out period defined by the servlet container" can be correct?

Thank you

Which statement about HttpSession object are true ?
(Choose all that apply)

A. A Session whose time out period has been set to -1 will never expire

C. A session will become invalid after time out period defined by the servlet container
 
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can specify timeout in web.xml by using


if you specify 0 or negative value in <session-timeout> tag session will never invalidate(never expire).
 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi muthu,

there are three ways to define session timeout for any web application.
first is what gowher explained - using DD (in mins).
second by programmer in the code (in seconds) and third by the container vendor. Tomcat container sets the session timeout 30 min only when the above two is not present in the application.

 
You are HERE! The other map is obviously wrong. Better confirm with this tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!