Tomcat CometProcessor NIO 通过 Apache httpd 提供服务?
我有一个 CometProcessor Servlet 在 Apache Tomcat 中工作正常。 我的 server.xml 连接器条目是:
<Connector connectionTimeout="20000" port="8080" protocol="org.apache.coyote.http11.Http11NioProtocol" redirectPort="8443"/>
我可以直接使用 Tomcat 的 URL 访问 servlet(名为“EventBus”),如下所示:
我有 Apache httpd 提供 .jsp 文件和 servlet,其中带有基本的workers.properties 文件,其工作人员如下:
worker.ajp13w.type=ajp13
worker.ajp13w.host=localhost
worker.ajp13w.port=8009
这适用于除我的 CometProcessor servlet 之外的所有内容。当我尝试访问这个 servlet 时,我得到:
HTTP method GET is not supported by this URL
有谁知道如何正确地将请求从 Apache httpd 转发到 Apache Tomcat 以实现像 CometProcessor 这样的 NIO 连接?
感谢您的任何帮助。
I have a CometProcessor Servlet working fine in Apache Tomcat.
My server.xml connector entry is:
<Connector connectionTimeout="20000" port="8080" protocol="org.apache.coyote.http11.Http11NioProtocol" redirectPort="8443"/>
I can hit the servlet (named 'EventBus') with a URL to Tomcat directly like so:
I have Apache httpd serving up .jsp files and servlets with a basic workers.properties file with a worker like:
worker.ajp13w.type=ajp13
worker.ajp13w.host=localhost
worker.ajp13w.port=8009
This works fine with everything but my CometProcessor servlet. When I try to hit this servlet I get:
HTTP method GET is not supported by this URL
Does anyone know how to properly forward requests from Apache httpd to Apache Tomcat for an NIO connection like a CometProcessor?
Thanks for any help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您不能将 CometProcessor 与 Apache 一起使用。 CometProcessor 需要异步 I/O,通过 Apache httpd 不可能做到这一点。
JK 不能确定工作,因为只有 APR 和 NIO 连接器支持 CometProcessor。
您也许可以使用 mod_proxy 将连接转发到 NIO 连接器,但您不会异步获取事件。
I don't think you can use CometProcessor with Apache. CometProcessor requires asynchronous I/O, it's impossible doing this through Apache httpd.
JK doesn't work for sure because only APR and NIO connectors supports CometProcessor.
You might be able to use mod_proxy to forward the connection to your NIO connector but you would not get event asynchronously.