集成PHP,JasperReports和Apache Tomcat 6 [英] Integrate PHP, JasperReports, and Apache Tomcat 6
问题描述
我无法制作PHP& JasperReports在Tomcat 6上工作。
I cannot make PHP & JasperReports work on Tomcat 6.
我在Windows XP上有xampp(apache,php5.3.1,mysql,tomcat6)。
I have xampp (apache, php5.3.1, mysql, tomcat6) on Windows XP.
我按照步骤安装php-java桥,但PHP页面抛出错误。
I followed the steps to install the php-java bridge, but PHP pages throw error.
有人成功集成了php,php-java桥,JasperReports ?
Does someone have successfully integrate php, php-java bridge, JasperReports?
这可以在没有Apache Tomcat的情况下完成吗?
Can this be done without Apache Tomcat?
推荐答案
背景
PHP和Java是不同的编程语言。它们需要PHP / Java Bridge进行连接。
Background
PHP and Java are different programming languages. They require the PHP/Java Bridge to connect.
Apache Tomcat 和JasperReports是基于Java的技术。它们自然连接。
Apache Tomcat and JasperReports are Java-based technologies. They connect naturally.
Apache HTTP Server ,另一方面,有一个PHP集成。
Apache HTTP Server, on the other hand, has a PHP integration.
如果您有PHP基础架构,那么最简单的解决方案如下:
If you have a PHP infrastructure, then the easiest solution is the following:
- 安装Apache HTTP Server。
- 安装PHP。
- 安装最新的Java Runtime Environment。
- 安装PHP / Java Bridge。
- 运行Apache,PHP和PHP / Java Bridge。
- 在PHP文件中包含PHP / Java Bridge标头。
- 从PHP调用JasperReports API。
- 执行报告。
- Install Apache HTTP Server.
- Install PHP.
- Install the latest Java Runtime Environment.
- Install the PHP/Java Bridge.
- Run Apache, PHP, and the PHP/Java Bridge.
- Include the PHP/Java Bridge headers in your PHP file.
- Call the JasperReports API from PHP.
- Execute reports.
这是一个繁琐且技术复杂的解决方案。使用Apache Tomcat而不是Apache HTTP Server只会增加复杂性,因为您还需要一种集成PHP的方法。
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.
如果您可以放弃PHP并使用直接Java,我会推荐JavaServer Pages(JSP)。集成成为:
If you can forego PHP and use straight Java, I would recommend JavaServer Pages (JSPs). The integration becomes:
- 安装最新的Java Runtime Environment。
- 安装Apache Tomcat。
- 从JSP调用JasperReports API。
- 执行报告。
- Install the latest Java Runtime Environment.
- Install Apache Tomcat.
- Call the JasperReports API from JSP.
- Execute reports.
图
Diagram
这篇关于集成PHP,JasperReports和Apache Tomcat 6的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!