|
From: <php...@li...> - 2008-05-28 14:10:07
|
Hi,
you should be able to access the foreign context, provided that the foreign context is accessible. PHP scripts don't behave different than JSP's.
In particular the following code should work:
<?php require_once("java/Java.inc");
$request = java_context()->getHttpServletRequest();
echo java_inspect($request);
$response = java_context()->getHttpServletResponse();
$context = java_context()->getServletContext();
$otherContext = $context->getContext("/JavaBridge");
$dispatcher =
$otherContext->getServletContext()->getRequestDispatcher("/my.jsp");
$dispatcher->forward($request, $response);
?>
> the parser
> php.java.bridge.Parser seems to interpret this as an invocation on the
> JavaBridge instance, php.java.bridge.JavaBridge.
I think this is a misunderstanding. The Request$PhpNull means that you invoke a Java method with a NULL value, obtained from the previous method call. Either the "/other-context" doesn't exist or it is not accessible.
> I'm encouraged by the following var_dump output:
You can also use: echo java_inspect($java_value) :)
Regards,
Jost Boekemeier
__________________________________________________________
Gesendet von Yahoo! Mail.
Dem pfiffigeren Posteingang.
http://de.overview.mail.yahoo.com
|