Sunday, February 9, 2014

Installing the BIRT Viewer in Tomcat


BIRT POJO Viewer

Starting with the release of BIRT 3.7 the Viewer has been changed to be POJO based. All required BIRT plugins are now in the WEB-INF/lib folder of the Viewer, and the WEB-INF/platform directory has been removed. The Viewer should continue to operate as in previous versions of BIRT. More information about this change is available in the BIRT 3.7 Migration Guide.

Using Tomcat

This page explains how to deploy the BIRT viewer to a Java EE container. We'll useApache Tomcat, since it is open source and readily available. The same concepts, perhaps with different details, apply to other app servers. These instructions assume you'll install Tomcat on your own machine using the default port number of 8080.

Install the Viewer

Deploy the BIRT Viewer application. Follow these steps:
  • Download the zip file with the BIRT report engine runtime. The file is named birt-runtime-version#.zip.
  • Unzip the file in a staging area.
  • Look under the birt-runtime- directory and locate the "Web Viewer Example" directory.
  • Copy the Web Viewer Example directory to the webapps directory of your Tomcat installation. For ease of reference, rename the directory to "birt-viewer".
  • Stop, then restart Tomcat.
  • Display the Tomcat manager application to check that the viewer is deployed:http://localhost:8080/manager/html.
  • Verify that birt-viewer is listed as an application, then click on the birt-viewer link.
  • A page confirming that the BIRT viewer has been installed should be displayed. Click on the link labeled "View Example" to confirm that your installation is working properly.
  • The BIRT Viewer requires that cookies be enabled.
If you choose to put the Viewer into some other location, you'll need to use a context entry within the server.xml file to indicate the deployment location. See Tomcat documentation for details.

Install your JDBC Drivers

Add the jar files for your JDBC drivers to the Viewer. Copy the driver the following directory:

BIRT JDBC Driver Location Note:

    If you are installing BIRT 2 series the driver needs to be copied to birt-viewer\WEB-INF\platform\plugins\org.eclipse.birt.report.data.oda.jdbc\drivers directory.
    If you are installing BIRT 3.7 or higher, the jdbc driver should be placed in the WebViewer's classpath (eg WEB-INF/lib).

Testing a More Complex Report

We'll test the viewer further using one of the example reports created for the "Classic Models" database. Note that Classic Models database is included in the birt runtime distribution so no further set-up is required. Follow these steps:

No comments:

Post a Comment