This week's book giveaways are in the iOS and Features new in Java 8 forums. We're giving away four copies each of Barcodes with iOS: Bringing together the digital and physical worlds and Core Java for the Impatient and have the authors on-line! See this thread and this one for details.
Your Web container is the one spawning new threads to service the request. So, it should be a configuration in your container to timeout the thread. For example, in Webshere you can configure the thread pool size and the timeouts.
Originally posted by Gopikrishna Madishetti: <session-config> <session-timeout>120</session-timeout> </session-config>
That controls how long a session will be inactive before the container can invalidate it. The original question was "Can we set request to be timedout?" which has nothing to do with sessions.
I'm not sure what it would mean for a request to "time out". I wouldn't be surprised if a client (e.g. a browser) stopped waiting for a response after X seconds or minutes, but naturally that can't be controlled by the server in any way.
Joined: Oct 06, 2008
I agree with Paul. If the 'timeout' is meant in client side, you could define the timeout in client socket before you send request.
Really, jsp/servlets don't have this? What about the servlet containers? Asp.Net has this and even PHP offers script execution timeout at the backend. So what this means is that a request could potentially hang continuously until the container is restarted?