Page 1 of 1

Calling PHP scripts from JSP?

Posted: Thu Apr 13, 2006 9:25 am
by cedricdj
Hi,

is there a simple way to call PHP scripts with some GET parameters from JSP? I would also need to get some information back, though it will be very simple and could be done using the PHP's standard output. The PHP and JSP scripts will be running on the same machine, the PHP scripts through Apache and the JSP ones through Tomcat.
I have no need to share more data than the GET parameters and return string mentioned above.

Thanks,

Cédric.

Posted: Thu Apr 13, 2006 9:32 am
by feyd
Is it not possible to do what you wish solely in JSP? It would be odd if it were not.

Posted: Thu Apr 13, 2006 9:40 am
by cedricdj
What I'm doing is integrating phpBB in an existing JSP project, which require a little communication between the two (mainly keeping the two user databases synchronised). Sure, I could rewrite a JSP-based forum, but that sounds like a lot more work ;)

Posted: Thu Apr 13, 2006 9:43 am
by feyd
Why not write the sync code in JSP? All it would be is some database interaction, the scripting language used is generally irrelevant.

Posted: Thu Apr 13, 2006 10:07 am
by cedricdj
That would be an option, and I will do that if the integration idea fails.

However I would like to leave the JSP side of the framework with as little modifications as possible, and keep as much as possible of the forum-related code on the PHP side.

Posted: Thu Apr 13, 2006 10:46 am
by Weirdan
this http://jguru.com/faq/view.jsp?EID=104987 might be of help. They are talking about POST, GET should be even simplier.

Posted: Thu Apr 13, 2006 11:09 am
by cedricdj
That looks very much like what I need! Indeed, looking through their code adapting it to GET parameters should be easy.

Thanks!