This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Setting Request - Response Time Out Programatically

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

One of my servlets is getting connected to a heavily loaded system and it is very frequest to get the request timeouts. This is fine as per requirements but we need to set the timeout period programatically (read from xml or properties file). Also in case of a time out (after timeout period) we need to show a page with message using JSP/Servlet "Sorry Server Is Not Available At The Moment."

Is there any way I can set the timeout value between request and response? Also how do I trap the timeout? This needs to be done programatically or using non-vendor dependent feature because our app needs to work on all servlet containers.

Thanks alot.

Vikas Aggarwal
 
chnaresh Cheedella
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can put session time out in web.xml

there you specify the session time out.
and also put error page in that xml then whenever the session time has been over then it will displays that page.
 
Eddy Lee Sin Ti
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As far as I aware of, it is a container specific configuration.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic