java Tomcat 中的 NIO 连接器
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2996761/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
NIO Connector in Tomcat
提问by Alvin
I'm trying to enable NIO Connector in Tomcat 6.0 by configuring server.xml file, but I'm getting Firefox can't establish a connection to the server at localhost:8081.in the browser whenever I type localhost:8081.
我正在尝试通过配置 server.xml 文件在 Tomcat 6.0 中启用 NIO 连接器,但我发现Firefox 无法与位于 localhost:8081 的服务器建立连接。每当我输入localhost:8081时,在浏览器中。
This is how I've configured NIO connector in Tomcat 6.0. May I know what's the problem?
这就是我在 Tomcat 6.0 中配置 NIO 连接器的方式。我可以知道有什么问题吗?
<Connector connectionTimeout="20000" port="8081" protocol="org.apache.
coyote.http11.Http11NioProtocol" redirectPort="8443"/>
回答by JoseK
I've tried your tag on my server.
我已经在我的服务器上试过你的标签。
Your Connector tag has one unnecessary space between apache.and coyoteRemove it or try with the one below.
你的连接器标签有之间的一个不必要的空间apache.,并coyote删除它或者与下面的一个尝试。
<Connector connectionTimeout="20000" port="8081" protocol="org.apache.coyote.http11.Http11NioProtocol" redirectPort="8443"/>
It should start up.
它应该启动。

