Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

when a request expires

 
Neeraja Neeraj
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anybody please let me know
1.when a request expires
2.when a session expires and
3.when a application(servlet context) expires?
Thanks.
Neeraj
 
yogen joshi
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
My answer is as follows,
1. request expires after its corresponding response object is committed.
2. session expires after a specific session inactivity time which can be
configured in minutes in the web.xml.
<session-config>
<session-timeout>5</session-timeout>
</session-config>
or
programatically inside a servlet
session.setMaxInactiveInterval(int second)

or
through a call to
session.invalidate();
3.ServletContext expiration can be done by a SysAdmin etc. or when the
web server stops.
Anybody has a better answer ?
yogen
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!