Integrate PHP, JasperReports, and Apache Tomcat 6

℡╲_俬逩灬. 提交于 2019-12-11 07:29:18

问题


I cannot make PHP & JasperReports work on Tomcat 6.

I have xampp (apache, php5.3.1, mysql, tomcat6) on Windows XP.

I followed the steps to install the php-java bridge, but PHP pages throw error.

Does someone have successfully integrate php, php-java bridge, JasperReports?

Can this be done without Apache Tomcat?


回答1:


Background

PHP and Java are different programming languages. They require the PHP/Java Bridge to connect.

Apache Tomcat and JasperReports are Java-based technologies. They connect naturally.

Apache HTTP Server, on the other hand, has a PHP integration.

Architectures

PHP

If you have a PHP infrastructure, then the easiest solution is the following:

  1. Install Apache HTTP Server.
  2. Install PHP.
  3. Install the latest Java Runtime Environment.
  4. Install the PHP/Java Bridge.
  5. Run Apache, PHP, and the PHP/Java Bridge.
  6. Include the PHP/Java Bridge headers in your PHP file.
  7. Call the JasperReports API from PHP.
  8. Execute reports.

This is a cumbersome and technically complex solution. Using Apache Tomcat instead of Apache HTTP Server will just add to the complexity because you will need a way to integrate PHP as well.

Java

If you can forego PHP and use straight Java, I would recommend JavaServer Pages (JSPs). The integration becomes:

  1. Install the latest Java Runtime Environment.
  2. Install Apache Tomcat.
  3. Call the JasperReports API from JSP.
  4. Execute reports.

Diagram




回答2:


Yes, it can be done without Tomcat. You have to run JRE on background.

See this link for further information.



来源:https://stackoverflow.com/questions/4082775/integrate-php-jasperreports-and-apache-tomcat-6

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!