Skip to main content
Jump to: navigation, search

Servlet Example

Servlet Example

This example demonstrates using the RE API within a servlet. Note if possible it is better to use the BIRT Web Viewer Example. Add comments at the bottom of the example.

BIRT Report Engine API Return to the BIRT Report Engine API examples


1. Create a WebReport/WEB-INF/lib directory underneath the Tomcat webapps directory.

2. Copy all the jars in the birt-runtime-2_1_0/ReportEngine/lib directory from the Report Engine download into your WebReport/WEB-INF/lib directory.

3. Create a directory named platform in your WEB-INF folder.

4. Copy the birt-runtime-2_1_0/Report Engine/plugins and birt-runtime-2_1_0/ReportEngine/configuration directories to the platform directory you just created.

Document1 01.png
This example application consist of three files that are archived into webreport.jar. If you are using Eclipse to build the servlet make sure to add all the jars, from the birt-runtime-2_1_0/ReportEngine/lib directory to your build path. You will also need servlet.jar, from the Tomcat Eclipse plug-in in your build path. Either build or copy webreport.jar from the example and place it in your WEB-INF/lib directory.

  • - Configuration properties for the Engine.
  • - Class used to initialize the Report Engine.
  • - The servlet that handles report generation on a GET command.


Back to the top