cong Posted August 30, 2007 Share Posted August 30, 2007 We have been developing an open source project. That is a web application. All web forms for entering and searching data are implemented already. Data is available in our database. We are missing with a report generating. JasperReport is one possible solution. Technically, we have created report designs by using iReport. This template have been checked successfully in iReport with data connection. Then, we have written a Java class to create reports without iReport but definitely JasperReport's libraries required. Currently, we have a problem is that we don't know how to integrate our templates and Java codes into the CGI in Perl. Do you have any idea? Could you tell us how to do it? Thanks a lot! Link to comment Share on other sites More sharing options...
Linuxhippy Posted September 3, 2007 Share Posted September 3, 2007 it depends on the load of your application. * The simplest possible solution is to start a seperate java-process for each report you have to generate, store it in a file and read it using perl and send it to the client. * A better solution would be e.g. to setup a tomcat server, and set the link for generating the reports to the tomcat-server. This time only one JVM is started and keeps running (which is very important for performance). Good luck, lg Clemens Link to comment Share on other sites More sharing options...
Linuxhippy Posted September 3, 2007 Share Posted September 3, 2007 it depends on the load of your application. * The simplest possible solution is to start a seperate java-process for each report you have to generate, store it in a file and read it using perl and send it to the client. * A better solution would be e.g. to setup a tomcat server, and set the link for generating the reports to the tomcat-server. This time only one JVM is started and keeps running (which is very important for performance). Good luck, lg Clemens Link to comment Share on other sites More sharing options...
cong Posted September 3, 2007 Author Share Posted September 3, 2007 We are using Apache2 as a Web server. So, we want to apply the first method in your suggestion. Currently, we can execute Java class as a standalone application. After Java process is carried out, a PDF file is generated successfully. But the problem is that we don't know how to run this Java class in CGI codes of Web framework. That should be nice if you can tell us how to start Java processes inside Perl CGI. Link to comment Share on other sites More sharing options...
Linuxhippy Posted September 4, 2007 Share Posted September 4, 2007 I don't know, it also does not belong here.But in C its called system() and Java also does have something like that, so I am sure perl also can call executables. I warn you: The performance will really suffer using this approach! Use it only on low-load pages. lg Clemens Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now