|
From: <php...@li...> - 2008-02-12 23:11:43
|
I think I got it, but I am still having some trouble getting at my custom java classes.
Despite apache / tomcat being on the same server, it seems promiscuous needs to be on, as well as allow_url_include.
So now I can load the Java.inc via:
require_once("http://192.168.15.62:8080/JavaBridge/java/Java.inc");
But now, I cannot get java_require or java_autoload to get at my classes packaged within my web app.
Do I have to serve up the jar and reference it something like this?
java_require("http://localhost:8080/JavaBridge/myapp.jar");
As I understand it, simply using java_require("myapp.jar") should be able to resolve correctly, considering the context of the Java.inc being within the JavaBridge web app. In other words, if indeed the Java.inc is setup correctly within the JavaBridge web app, by just doing java_require("myapp.jar"), the PhpJavaServlet will be called upon to load up that class from within its local lib, no?
I am almost there!!
Thanks again,
~tim
Message: 8
Date: Tue, 12 Feb 2008 15:41:42 -0500
From: php...@li...
Subject: Re: [Php-java-bridge-users] bridge setup - missing something
To: <php...@li...>
Message-ID: <4BE...@EV...>
Content-Type: text/plain; charset="iso-8859-1"
Hi Jost,
I see the need for JavaBridge.jar and php-servlet.jar (which includes the PhpJavaServlet). I see how it is an example web app, that happens to include the required modules for apache <--> tomcat, as well as a couple of handy files such as test.php.
My JavaBridge.war deployment loads fine, and I can access test.php, as well as settings.php. The JSP's load fine too. The test.php in particular loads, and has all of the java system properties, as well as the "PHP says that Java says: hello PHP from Java!" and php_java_bridge_Util::type()->VERSION
produces 5.0.0 too.
This suggests that it is working fine on Tomcat - however...
The following test.php on apache:
<?php
require_once("http://127.0.0.1:8080/JavaBridge/java/Java.inc");
$System = java("java.lang.System");
echo $System->getProperties();
?>
produces nothing in the page, and::
PHP Warning: require_once(http://127.0.0.1:8080/JavaBridge/java/Java.inc) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: no suitable wrapper could be found in C:\\Program Files\\Apache Software Foundation\\Apache2.2\\htdocs\\test.php on line 2
in the apache error logs.
I am sure I am missing an apache setting, but I have been unable to figure out what.
Please help, thanks so much, and sorry for bothering you with this crap.
~tim
|