|
From: <php...@li...> - 2009-08-17 14:43:58
|
Hi Jost, thank you for the reply. > Is it a standalone web- or desktop application? It is a standalone desktop application, but several tasks will also interface a remote Web server, if/when a network connection is available. > Why do you need jetty for a desktop application? I found it helps a lot to give structure and order to the application(s). It takes care of potential CLASSPATH issues, it's easy to setup and start/stop, and has a small footprint. Last but not least, it keeps a door open for more advanced functionality I may need in the future - this is just the first of (hopefully) several applications. > If you want to use PHP as a plugin only, use the JSR 223 API. I am currently trying to connect the Swing application with Jetty-hosted PHP scripts via JSON-RPC, since the (RAW POST based) protocol is quite efficient and easy to implement, both in PHP and in Java. Sadly though, while I can readily access the RAW POST data via php://input and can also write the JSON string received from Java to a file, I see the fastcgi is unable to output the response ... looks like the communication channel is corrupted somehow as soon as I fopen it for reading. On the grounds that I may be violating the standard way of interacting with a servlet, I've been struggling the past few days to solve the problem by using java_context() methods and properties, but without success so far ... I'd appreciate some advice. Massimo |