donglao4370 2015-07-10 22:12
浏览 50

在Tomcat上集成Apache和Java上的PHP

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.

  • 写回答

1条回答 默认 最新

  • dongwen1871 2015-07-10 22:30
    关注

    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.

    评论

报告相同问题?

悬赏问题

  • ¥15 matlab中使用gurobi时报错
  • ¥15 WPF 大屏看板表格背景图片设置
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥16 mybatis的代理对象无法通过@Autowired装填
  • ¥15 可见光定位matlab仿真
  • ¥15 arduino 四自由度机械臂