views:

113

answers:

7

Is it possible to build a Java web application which has a PHP front end ?

I want all my web pages to be coded in PHP. Most of them will be forms.

I want all the data submitted by a form to go to a Java Code.

I want to do all manipulation in back end and all rendering of web content on the front end.

This is just a general question as I was probing for different options for my java web application.

A: 

Yes. You can build a java web-application which has php front end.

giri
A: 

it is possible even with C++ backend. but why?

Col. Shrapnel
+1  A: 

It depends on where the two meet. You could have, for example, have Java backend and PHP frontend communicating via web services. I however see no benefit in such a combination.

mindas
+2  A: 

A web application, by definition is already a frontend (or at least includes it).

If you meant a PHP webapp built on top of a Java backend, sure, that's possible. If you use SOAP or REST for communication between the layers, it's actually relatively easy. The only drawback compared to a pure Java (or pure PHP) app would be the overhead of those protocols, so you have to be careful to avoid too fine-grained service interfaces.

Michael Borgwardt
I want a simple integration. Is it not possible for the data submitted by php forms to be captured and manipulated by a simple java web application code ??
Anand
@Anand: there's no such thing as a PHP form. It sounds like you want in fact a Java webapp without any PHP at all.
Michael Borgwardt
+3  A: 

You might also want to take a look at php-java bridge

npinti
+1  A: 

You can use Quercus, a Java implementation of PHP, to run PHP from within Java (and thus have easy access to Java classes).

gustafc
A: 

According to your edition, it looks like you don't need PHP at all. You confused it with HTML.

Col. Shrapnel