From: <php...@li...> - 2006-09-16 09:49:58
|
Hi Stephen, > module/class which simply calls the same java method > via the PHP Java > Bridge, then does the layout pretty much like the > JSP file used to. Yes, this should work fine. > HOWEVER the first stumbling block is that because > we're no longer > operating in a JSP sort of context, we don't appear > to have an > HttpServletRequest to pass to the backend any more You can access the HttpServletRequest from here: http://php-java-bridge.sourceforge.net/documentation/PHP-API/html/java_8c.html#doc26 and http://php-java-bridge.sourceforge.net/server/documentation/API/php/java/servlet/Context.html#getHttpServletRequest() > Is it clear what I am trying to achieve? You haven't mentioned if you run PHP within your servlet engine or within Apache or IIS. If you run PHP within your servlet engine, $request = java_context()->getHttpServletRequest(); will just work. If you run PHP in a HTTP server and only forward the embedded php java() statements, things will be more difficult, because the bridge doesn't pass all information to the back-end. For example a request GET http://host.com/foo/bar.php?param=... will cause the bridge to send a HTTP PUT request: PUT http://127.0.0.1:8080/foo/bar.phpjavabridge This means that you currently cannot retrieve the method() and the params from the request. -- But the bridge could forward them, if you need this. Regards, Jost Boekemeier ___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de ___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de |