FYI: In PHP/Java Bridge version 6.0.0 you can use the function
"java_virtual()" to include a local resource.
/**
* Include the outcome of some other local (.jsp, .asp, ...) resource.
*
* Example: <code>echo java_virtual("/test.jsp", true);</code>
*
* @access public
* @param string The local resource
* @param bool return the response
* @see Java
*/
function java_virtual($path, $return=false) {
$req = java_context()->getHttpServletRequest();
$res = $return ?
new java("php.java.servlet.RemoteHttpServletResponse") :
java_context()->getHttpServletResponse();
$req->getRequestDispatcher($path)->include($req, $res);
return $return ? $res->getBufferContents() : true;
}
|