From: <php...@li...> - 2010-02-14 17:52:38
|
Hi, PHP/Java Bridge version >= 5.5.4 uses HTTP/1.1 chunked connections to communicate with the servlet. From the NEWS file: ----- * If the Java environment doesn't allow java.lang.Threads, Sockets, or if the back end doesn't run on localhost ("127.0.0.1".equals(req.getRemoteAddr()), or if the promiscuous option is set, the bridge now uses a HTTP tunnel to communicate with the back end. Example: -- telnet YOURHOST.com 8080 PUT /JavaBridge/foo.phpjavabridge HTTP/1.1 Host: YOURHOST.com:8080 Transfer-Encoding: chunked 22 <H p="1" v="java.lang.String"></H> b <F p="E" /> 0 ----- We have tested this with Oracle/Bea WebLogic, Sun Application server, Glassfish, Tomcat. Servlet engines which do not flush their output immediately cannot use chunked encoding to implement a two-way connection. PHP/Java Bridge version 5.5.4 still contains "ContextRunners" which will be used if(LOCAL_ADDR.equals(req.getRemoteAddr()) && contextServer! =null && contextServer.isAvailable(channel)). If you install jetty on the local host and do not switch off the SocketContextServer, the bridge will still work with Jetty. > tried to properly set promiscuous mode If you switch off promiscuous mode again and run jetty on localhost (ip: 127.0.0.1), it should work. But I am currently preparing PHP/Java Bridge version 6.0.0, which will not contain these ContextServers anymore; chunked connections will be the only way to communicate with the servlet. I will try to find a workaround. In the worst case we'll have flag Jetty as unsupported. Which Jetty version and which operating system version do you use? Regards, Jost Bökemeier |