简体   繁体   中英

Integrate PHP on Apache and Java on Tomcat

1) I am using

              a) JSP : Front-end programming language
              b) PHP : Backend Programming language

2) These are the two languages can be run on Apache server without the integration of Tomcat.

3) But, for enhancing the logic of website, we use JAVA as another Back-end Programming language.

4) Now, this JAVA need to be integrated with the JSP and PHP pages of website.

5) So, in one JSP file, a part of the code can be in JAVA and part of the code can be in PHP.

6) Ideally, it would be great if the part of PHP code runs on Apache server and Java code runs on Tomcat server.

7) Else, please let me know to find an integration of PHP servlet which can use to run PHP code on Tomcat server.

PHP doesn't run in Tomcat; it gets run by an Apache module (if you're using Apache!)

JSP and Java will run in Tomcat. JSP won't run bare-metal in Apache.

There are a few ways to get Tomcat integrated into Apache.

In terms of what you seem to want to do- I would look at implementing it all in either in php or java/jsp.

If you can't do that, then you could implement some REST like services in php or java and call them from the other system. This actually might be a good thing if you want to scale things really big, but while things aren't really big(tm) you're going to have to manage the added complexity, not least of which are having things in completely different languages.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM