Home
DevShare Downloads
Calling the Chart Engine from a servlet
JasonW
The BIRT Chart Engine is very flexible and can be called in many ways. You can use the Chart Tag libraries to include the chart engine in a web app or you can write your own code. If you use the Chart tag libraries download the WTP Integration to include the chart engine module in a Dynamic web project. You can also see an example of using the tag libraries in the Chart Engine Download:
<br />
<br />
birt-charts-2_5_0DeploymentRuntimechart-viewer-sample.war
<br />
<br />
The attached example is an example of calling the Chart Engine directly. To build and deploy the example uses the jars in the
<br />
<br />
birt-charts-2_5_0DeploymentRuntimeChartEngine directory
<br />
<br />
Note that the 2.5.0 chart package has a bug that contains some incorrect jars
<br />
<br />
See this bug for build:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=286269
<br />
<br />
to fix the issue.
<br />
<br />
The chart engine can be started with or without OSGi. In this example no OSGi is used. All the jars from the above directory are copied to my WebApp/WEB-INF/lib. The code for the servlet is compiled into a jar and placed in this directory as well. See the code for an example web.xml and test page. Also note that chart images are generated in an WebApp/images directory which you must create. The servlet does not currently clean up these images, so you will need to modify it to do that. The example also illustrates using image maps for interactivity.
Find more posts tagged with
Comments
There are no comments yet