From: <php...@li...> - 2006-02-23 18:32:31
|
Hi, > the packaging of > all the components into one archive. Do you have any > examples of how this > is done? I think the JavaBridge.war (the j2ee binary download) file is a good example. You rename it to, say "mybridge.war" and copy it to the autodeploy folder of the servlet engine or application server. After that you can visit: http://localhost:8080/mybridge and run the php examples. The fact that the bridge uses a servlet engine as its execution environment is an "accident", an implementation detail; php and java have to communicate using a "continuation passing style", php calls the servlet engine and the servlet engine in turn calls the php (fast-) cgi api. If you restrict your servlet engine to listen only on the local (127.0.0.1) interface, you can hide this implementation detail to your users. > PHP as an internal [and external] > scripting language for > the game. I think the java-server-faces example shows this. When you click on the helloWorld.jsf link, the JSF application tries to invoke the external php script @80:/helloWorld.php, see the faces-config.xml. If that fails, it tries again, using the local script /helloWorld.php from the .war file. What the JSF example doesn't show is that the bridge can even hold the external script instance hostage, i.e. you can invoke functions or methods and examine properties. In combination with php5 reflection this could be used to implement auto completion, for example. Regards, Jost Boekemeier ___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de |