Meaningless Drivel is fun!*
The moose likes Servlets and the fly likes Setting Request - Response Time Out Programatically Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Setting Request - Response Time Out Programatically" Watch "Setting Request - Response Time Out Programatically" New topic
Author

Setting Request - Response Time Out Programatically

Vikas Aggarwal
Ranch Hand

Joined: Jun 22, 2001
Posts: 140
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

Joined: Nov 01, 2006
Posts: 7
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

Joined: Oct 06, 2005
Posts: 135
As far as I aware of, it is a container specific configuration.


SCJP, SCWCD, SCJWS, IBM 700,IBM 701, IBM 704, IBM 705, CA Clarity Technical<br /> <br /><a href="http://eddyleesinti.blogspot.com" target="_blank" rel="nofollow">http://eddyleesinti.blogspot.com</a>
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Setting Request - Response Time Out Programatically
 
Similar Threads
Session Time out
popup from backend?
question on destroying a session
priorities in Servlet 2.3
Axis2 stub Client taking time to get response from a webservice