0

I have Apache Tomcat 7.0 and have developed two different applications in PHP and Java EE. I want to deploy these two applications in the same server, Apache Tomcat 7.0.

Is there any possibility of deploying both applications in the same server? Is it possible to have inter application communication? Can I pass data from one application to the other?

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
user1107939
  • 51
  • 3
  • 4

2 Answers2

0

Yes, you can run PHP and Java applications in a same server with Tomcat 7, Apache 2 and JK Connector.

http://tomcat.apache.org/connectors-doc/webserver_howto/apache.html

You can use database or webservice to share data.

0

Java, obviously, runs on Apache Tomcat already. But you can also install quercus/php on your Tomcat Server, and then run your PHP application directly on Tomcat as well, eliminating the need for Apache HTTPd and mod_jk. (No I dont work with them. Just a user.)

Once you have both Apps on same Tomcat server, you have several options to have them communicate with each other.

  1. Web Services expossed by either or both apps.
  2. crossContext=true
  3. Having a Shared Memory Block seems to be an option, as described here.

There would be more ways I suppose, these are the ones that come to mind.

Community
  • 1
  • 1
Tuncay Göncüoğlu
  • 1,699
  • 17
  • 21