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?
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:
- 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.
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:
- Install the latest Java Runtime Environment.
- Install Apache Tomcat.
- Call the JasperReports API from JSP.
- Execute reports.
Diagram
Yes, it can be done without Tomcat. You have to run JRE on background.
See this link for further information.