Installing the BIRT Viewer in Tomcat
Using Tomcat
This page explains how to deploy the BIRT viewer to a J2EE container. We'll use Apache 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.
If you don’t have Tomcat installed on your system you can download it from http://jakarta.apache.org/tomcat. BIRT works with the 4.1.x and 5.5.x verisons of Tomcat.
Tomcat 6 Note:
- If you are installing the Web Viewer on Tomcat 6, you will need to download the commons logging library. You can add this library to WebViewerExample/WEB-INF/lib or to Tomcat's lib directory.
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".
- Copy additional files to the directory structure described in the BIRT Runtime Note below (iText and prototype.js).
- 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.
iText
Verify that you have downloaded iText 1.3 (only required for BIRT 2.1.2 and earlier builds) and follow the note below:
Birt 2.1.2 Runtime Note (Not required for 2.2 or 2.1.3 builds):
- If you are installing the BIRT 2.1.2 Runtime (J2EE Application Server Deployment),
- Copy itext-1.3.jar to /WebViewerExample/WEB-INF/platform/plugins/com.lowagie.itext/lib.
- Copy iTextAsian.jar to /WebViewerExample/WEB-INF/platform/plugins/com.lowagie.itext/lib.
Install your JDBC Drivers
Add the jar files for your JDBC drivers to the Viewer. Copy the driver the following directory:
Birt 2.1/2.2 Note:
-
If you are installing BIRT 2.1 or later the driver needs to be copied to birt-viewer\WEB-INF\platform\plugins\org.eclipse.birt.report.data.oda.jdbc\drivers.
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:
-
Download the zip file with the BIRT report engine runtime. The file is named birt-runtime-
.zip. - Click on the following link to download the example report design, SalesInvoice.rptdesign into another browser window. Use the "Save as..." command from the file menu to save the report into the birt-viewer/report directory.
-
If you've installed everything in its default location, then click on the following link. If you've changed anything, then copy the following URL into your browser and make the needed changes.
http://localhost:8080/birt-viewer/run?__report=Report\SalesInvoice.rptdesign
orhttp://localhost:8080/birt-viewer/frameset?__report=Report\SalesInvoice.rptdesign
The report should run and appear in your browser. See Viewer Usage for information on the Viewer Operations.
Deploying to JBoss
To deploy the BIRT Viewer application to JBoss, 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 "WebViewerExample" directory. - Copy the "WebViewerExample" directory to your JBoss installation, under the deploy directory for your configuration. (eg) C:\jboss-4.0.3SP1\server\default\deploy.
- Rename the WebViewerExample directory to birt.war, so it will deploy in place.
- Copy itext-1.3.jar (BIRT 2.1.2 only; This step is not required for 2.1.3/2.2) to /WebViewerExample/WEB-INF/platform/plugins/com.lowagie.itext/lib.
- Copy iTextAsian.jar (BIRT 2.1.2 only; This step is not required for 2.1.3/2.2) to /WebViewerExample/WEB-INF/platform/plugins/com.lowagie.itext/lib.
- Start up JBoss and enter the URL to BIRT (ie http://localhost:8080/birt) and run the test report.
Other J2EE Servers
We are currently working on instructions for other application servers.

