开发者

Integrate PHP, JasperReports, and Apache Tomcat 6

I cannot make PHP & JasperReports work on Tomcat 6.

I have xampp (apache, php5.3.1, mysql, tomca开发者_开发知识库t6) 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?


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

Integrate PHP, JasperReports, and Apache Tomcat 6


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

See this link for further information.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜