Anand Sunderraman
Anand Sunderraman

Reputation: 8148

A Java and PHP application

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.

Upvotes: 0

Views: 246

Answers (7)

Your Common Sense
Your Common Sense

Reputation: 158005

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

Upvotes: 0

gustafc
gustafc

Reputation: 28905

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

Upvotes: 1

npinti
npinti

Reputation: 52205

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

Upvotes: 3

Michael Borgwardt
Michael Borgwardt

Reputation: 346556

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.

Upvotes: 2

mindas
mindas

Reputation: 26733

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.

Upvotes: 1

Your Common Sense
Your Common Sense

Reputation: 158005

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

Upvotes: -1

giri
giri

Reputation: 27259

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

Upvotes: 0

Related Questions