There are four different integration options in order of complexity and your requirements.有4种不同的整合选项,以便的复杂性和您的要求。 They are as follows:他们分别如下:

Multi-port Integration 多端口整合
Run Apache (with PHP) on default port 80 and Tomcat on default port (8080).运行的Apache (用PHP )就默认端口80和雄猫就默认端口( 8080 ) 。 They can run on the same machine with different ports without any problems whatsoever.他们可以运行在同一台机器上与不同的端口没有任何问题可言。 This is the simplest procedure.这是最简单的程序。

Single Port Integration (Apache Mapping) 单一港口一体化( Apache的映射)
In this scenario Apache and Tomcat runs on different ports as above.在这种情况下Apache和Tomcat和运行于不同的端口如上。 However Tomcat any application can be mapped to a path on Apache server.不过雄猫任何应用可以映射到一个路径对Apache服务器。 So it doesn’t appear to the end user that two servers are running.因此,它不会出现向最终用户认为,两个服务器正在运行的程序。 This is almost as simple as sbove.这是几乎一样简单sbove 。

Running PHP 5.x in Tomcat 运行PHP 5.x的在Tomcat
The link above provides a detailed tutorial along with helpful comments from users.上面的链接提供了详细的补习随着有用的意见,由用户。 This isn’t very complex to setup (more complex than above) but you have to carefully follow the steps.这不是很复杂的安装程序(复杂得多以上) ,但你必须仔细按照下列步骤进行。 This also allows invoking php code from within jsp and with some minor changes in reverse direction too.这还允许引用的PHP代码从JSP和与一些细微的变化,在相反方向。

Single Port Integration (Apache Tomcat Connector) 单一港口一体化( Apache Tomcat和连接器)
This is slightly better than the Apache mapping solution above.这是略优于Apache的映射解决以上。 You can configure it to run static html pages in Apache and dynamic JSP pages using Tomcat.您可以设定它运行的静态的HTML网页在Apache和动态JSP页面使用的Tomcat 。 However it is a installation / configuration hell (almost).不过这是一个安装/配置地狱(几乎) 。

For all of the above you can exchange data between the PHP and Tomcat by using the database, files, invoking appropriate URL with GET/POST data etc. Additionally you can directly communicate in the对于上述所有您可以交换数据之间的PHP和Tomcat和利用数据库,档案,引用适当的网址与获取/ POST数据等另外,您还可以直接沟通,在
running PHP 5.x in Tomcat运行PHP 5.x的在Tomcat solution.的解决办法。