如何在Java servlet容器上指定Http Request timeout参数 [英] How to specify Http Request timeout parameter on Java servlet container
问题描述
我试图了解在哪里可以为到达我的servlet(或我所有的servlet)的所有请求配置请求超时?那是我认为的容器财产吗?
此外,这对不同的浏览器有何影响?它们都符合容器规定的参数吗?
或许请求超时时间甚至不是我可以控制的东西,每个浏览器自己决定这个?
(为了清楚我不是在谈论会话超时)
I'm trying to understand where I can configure a request timeout for all requests arriving to a servlet of mine (or all of my servlets)? Is that, as I think, a container property? Also, how does this affect different browsers? Do they all comply to the parameter the container dictates? Or maybe the request timeout time isn't even something I can control and each browser decides on this on its own? (Just to be clear I'm not talking about session timeout)
推荐答案
来自客户的超时(即在客户端确定等待对HTTP请求的响应的时间。对于IE,请参阅此,对于Firefox,请参阅这个。
The timeout from a client (i.e. how long it waits for a response to an HTTP request) is determined at the client. For IE, see this, and for Firefox see this.
您无法从服务器控制此超时。
You can't control this timeout from the server.
这篇关于如何在Java servlet容器上指定Http Request timeout参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!