BIRT Developer Center Download


Using BIRT and Actuate with JavaServer Faces (JSF)

JSF 1.x using jsf4birt


The jsf4birt component library supports the rendering of BIRT-based reports on pages within JavaServer Faces (JSF) Web applications. Report viewers implemented as JSF components using this library can then be easily adjusted through tag attributes. There are two components. A BIRT wrapper and an Actuate wrapper. The BIRT wrapper component displays BIRT reports created in BIRT’s Eclipse design tool. This component uses the BIRT runtime API. The component calls the appropriate part of the API from the BIRT runtime to get generated HTML code to put on the page. Everything is done on the server side following the usual JSF lifecycle processing. The Actuate wrapper component loads reports from an installed Actuate server. The component uses the Actuate JavaScript API to load and run reports on the page using client-side processing.

Download and Install the jsf4birt Component Library


Download the Exadel jsf4birt component library at the link below.

The jsf4birt wrapper depends on the BIRT Runtime in order to render and display BIRT report designs. The current version of the jsf4birt wrapper will work with either BIRT 2.3.2 or BIRT 2.5.2. You should also download a BIRT Report Designer in order to create new BIRT report designs.


The download ZIP file contains a comprehensive installation guide but the basic steps are:

Installing the jsf4birt component

  • Uncompress the ZIP containing the jsf4birt wrapper and read the license.
  • Navigate to the TLDocs folder and open index.html to find the documentation

The next few steps assume you have a web application configured for JSF and Facelets that you are going to be adding support for the jsf4birt wrapper. If you don't, skip the rest of the install steps and just download a complete demo web application as a WAR file from here

  • Copy all the JARs from the BIRT Runtime /ReportEngine/lib directory into your application's /WEB-INF/lib directory.
  • Create a directory named platform in your WEB-INF folder.
  • Copy the /Report Engine/plugins and /ReportEngine/configuration directories to the new 'platform' directory you just created.
  • Copy the jsf4birt.jar to your /WEB-INF/lib directory.

Download and install BIRT iHub Trial

To use the actuateWrapper, you will need to download and install a trial version of the BIRT iHub.

Instructions to Download and Install BIRT iHub

Testing the jsf4birt component

Creating a simple BIRT Design

Launch the BIRT Designer that you downloaded in a previous step.Download the Exadel jsf4birt component library from the marketplace at the link below.

  • Switch to the Report Design perspective
  • File | New | Report Design - Just pick the blank template and name it whatever you want.
  • Right-click on the report and insert a Label. - Just keep it simple at first by not including any external resources or database connections.
  • Save the report design and copy the rptdesign file to a folder in your web application

Testing the jsf4birt:birtWrapper

  • Add the following namespace attribute to your HTML tag
  • Use the birtWrapper similar to below
    <birt:birtWrapper id="report" reportDesign="/Reports/birt_report.rptdesign">
    <f:param name="MyParam" value="Something" />
  • Below is an example BIRT Report integrated as a JSF component.

Testing the jsf4birt:actuateWrapper

  • Add the following context parameters to the web.xml so you application knows where to find the Actuate iHub.



  • Add the following namespace attribute to your HTML tag
  • Use the actuateWrapper similar to below
    <birt:actuateWrapper id="report" reportName="/Home/administrator/Customer Dashboard.rptdesign"
    <f:param name="MyParam" value="Something" />
  • Below is an example BIRT Report from the BIRT iHub integrated as a JSF component.

JSF 2.x

This section works with JSF 2.0 with BIRT example that can be found in the devshare. The requirements to run this example are the JSF 2.0 and BIRT 3.7.2 jars.

The sample report that it’s packaged with it takes a country as a parameter then displays all of the customers that match and a chart that shows credit limit by is a class that I created to generate the report. Instead of writing it to an HTML file I?m using a ByteArrayOutputStream and set the output stream to this object. This allows me to display the HTML report in the same page as my xhtml.

// set render options including output type
PDFRenderOption options = new PDFRenderOption();
ByteArrayOutputStream outs = new ByteArrayOutputStream();
task.setRenderOption(options); is the managed bean that gets the value of the parameter that we would like to pass to the report. I do this with the getter and setter methods.

public String getName() {
return name;

public void setName(String name) { = name;

setName() is called when the command button is pressed in page-a.xhtml. It takes the value that the user has given us and stores it in the bean for later use. getName() is called whenever we are calling and will return the value of name. This allows us to output what the user has given as a parameter in the input text when the page is refreshed with the newly generated report.

Also in is getReport() this is another getter method that I use to call the birt2jsf class and return the outputstream.

public String getReport() {
birt2jsf report = new birt2jsf( );
String reportHTML = null;
try {
reportHTML = report.executeReport(name);

} catch (EngineException e) {
return reportHTML;

When the page is first loaded it will only show the input text. The report is there, I?ve set it to not be visible if no parameter has been passed to it. To see this in action type France and click view report.

If everything went well then you should see JSF and BIRT working together smoothly like the screen shot below. Where enter country, input text, and view report are JSF 2.0 tags and the report is being viewed by using the JSF h:outputText tag

<h:outputText value="#{}" escape="false"/>


Thanks for reading my blog and if you have any comments or questions feel free to do so below.

To download the example visit the devshare entry