This article is done for BIRT 3.7.1
For integrating BIRT in your web application follow the follwing steps. I am assuming in Maven, so it's little tricky as BIRT is not available from Maven repository. One way to install it in your local maven repository or a local nexus. However I have chosen the way to keep them in WEB-INF/lib and point from there. This way other developers do not have to do the installation process of jars in local repository. You can find other set of instructions at BIRT site at http://eclipse.org/birt/phoenix/deploy/viewerUsageMain.php.
Download BIRT from http://eclipse.org/birt/phoenix/. Unzip it at a common location. You will see the following folders
about_files
- ReportEngine
- WebViewerExamples
- <<other files and birt.war>>
Copy the libs from WebViewerExamples/WEB-INF/lib to maven project at webapp/WEB-INF/lib. You can selective pick the data definitions lib based on the database you are dealing with.
Change pom.xml and put the entries as follows. (Note that this is for postgresQL)
<!-- birt -->
<dependency>
<groupId>axis</groupId>
<artifactId>axis</artifactId>
<version>none</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/axis.jar</systemPath>
</dependency>
<dependency>
<groupId>com.ibm.icu</groupId>
<artifactId>com.ibm.icu</artifactId>
<version>4.4.2</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/com.ibm.icu4j-4_4_2_1.jar</systemPath>
</dependency>
<dependency>
<groupId>com.lowagie.text</groupId>
<artifactId>com.lowagie.text</artifactId>
<version>2.1.7</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/com.lowagie.text_2.1.7.v201004222200.jar</systemPath>
</dependency>
<dependency>
<groupId>commons-discovery</groupId>
<artifactId>commons-discovery</artifactId>
<version>0.2</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/commons-discovery-0.2.jar</systemPath>
</dependency>
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/commons-cli-1.0.jar</systemPath>
</dependency>
<dependency>
<groupId>derby</groupId>
<artifactId>derby</artifactId>
<version>none</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/derby.jar</systemPath>
</dependency>
<dependency>
<groupId>flute</groupId>
<artifactId>flute</artifactId>
<version>none</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/flute.jar</systemPath>
</dependency>
<dependency>
<groupId>jaxrpc</groupId>
<artifactId>jaxrpc</artifactId>
<version>none</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/jaxrpc.jar</systemPath>
</dependency>
<dependency>
<groupId>flute</groupId>
<artifactId>flute</artifactId>
<version>none</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/flute.jar</systemPath>
</dependency>
<dependency>
<groupId>js</groupId>
<artifactId>js</artifactId>
<version>none</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/js.jar</systemPath>
</dependency>
<dependency>
<groupId>org.apache.batik.bridge</groupId>
<artifactId>org.apache.batik.bridge</artifactId>
<version>1.6.0</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/org.apache.batik.bridge_1.6.0.v201011041432.jar
</systemPath>
</dependency>
<dependency>
<groupId>org.apache.batik.css</groupId>
<artifactId>org.apache.batik.css</artifactId>
<version>1.6.0</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/org.apache.batik.css_1.6.0.v201011041432.jar</systemPath>
</dependency>
<dependency>
<groupId>org.apache.batik.dom</groupId>
<artifactId>org.apache.batik.dom</artifactId>
<version>1.6.0</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/org.apache.batik.dom_1.6.0.v201011041432.jar</systemPath>
</dependency>
<dependency>
<groupId>org.apache.batik.dom.svg</groupId>
<artifactId>org.apache.batik.dom.svg</artifactId>
<version>1.6.0</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/org.apache.batik.dom.svg_1.6.0.v201011041432.jar
</systemPath>
</dependency>
<dependency>
<groupId>org.apache.batik.ext.awt</groupId>
<artifactId>org.apache.batik.ext.awt</artifactId>
<version>1.6.0</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/org.apache.batik.ext.awt_1.6.0.v201011041432.jar
</systemPath>
</dependency>
<dependency>
<groupId>org.apache.batik.parser</groupId>
<artifactId>org.apache.batik.parser</artifactId>
<version>1.6.0</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/org.apache.batik.parser_1.6.0.v201011041432.jar
</systemPath>
</dependency>
<dependency>
<groupId>org.apache.batik.pdf</groupId>
<artifactId>org.apache.batik.pdf</artifactId>
<version>1.6.0</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/org.apache.batik.pdf_1.6.0.v201105071520.jar</systemPath>
</dependency>
<dependency>
<groupId>org.apache.batik.svggen</groupId>
<artifactId>org.apache.batik.svggen</artifactId>
<version>1.6.0</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/org.apache.batik.svggen_1.6.0.v201011041432.jar
</systemPath>
</dependency>
<dependency>
<groupId>org.apache.batik.transcoder</groupId>
<artifactId>org.apache.batik.transcoder</artifactId>
<version>1.6.0</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/org.apache.batik.transcoder_1.6.0.v201011041432.jar
</systemPath>
</dependency>
<dependency>
<groupId>org.apache.batik.util</groupId>
<artifactId>org.apache.batik.util</artifactId>
<version>1.6.0</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/org.apache.batik.util_1.6.0.v201011041432.jar
</systemPath>
</dependency>
<dependency>
<groupId>org.apache.batik.util.gui</groupId>
<artifactId>org.apache.batik.util.gui</artifactId>
<version>1.6.0</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/org.apache.batik.util.gui_1.6.0.v201011041432.jar
</systemPath>
</dependency>
<dependency>
<groupId>org.apache.batik.xml</groupId>
<artifactId>org.apache.batik.xml</artifactId>
<version>1.6.0</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/org.apache.batik.xml_1.6.0.v201011041432.jar</systemPath>
</dependency>
<dependency>
<groupId>org.apache.commons.codec</groupId>
<artifactId>org.apache.commons.codec</artifactId>
<version>1.3.0</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/org.apache.commons.codec_1.3.0.v201101211617.jar
</systemPath>
</dependency>
<dependency>
<groupId>org.apache.xerces</groupId>
<artifactId>org.apache.xerces</artifactId>
<version>2.9.0</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/org.apache.xerces_2.9.0.v201101211617.jar</systemPath>
</dependency>
<dependency>
<groupId>org.apache.xml.resolver</groupId>
<artifactId>org.apache.xml.resolver</artifactId>
<version>1.2.0</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/org.apache.xml.resolver_1.2.0.v201005080400.jar
</systemPath>
</dependency>
<dependency>
<groupId>org.apache.xml.serializer</groupId>
<artifactId>org.apache.xml.serializer</artifactId>
<version>2.7.1</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/org.apache.xml.serializer_2.7.1.v201005080400.jar
</systemPath>
</dependency>
<dependency>
<groupId>org.eclipse.birt.runtime</groupId>
<artifactId>org.eclipse.birt.runtime</artifactId>
<version>3.7.0</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/org.eclipse.birt.runtime_3.7.0.v20110615-1818.jar
</systemPath>
</dependency>
<dependency>
<groupId>org.eclipse.core.contenttype</groupId>
<artifactId>org.eclipse.core.contenttype</artifactId>
<version>3.4.100</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/org.eclipse.core.contenttype_3.4.100.v20110423-0524.jar
</systemPath>
</dependency>
<dependency>
<groupId>org.eclipse.core.expressions</groupId>
<artifactId>org.eclipse.core.expressions</artifactId>
<version>3.4.3</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/org.eclipse.core.expressions_3.4.300.v20110228.jar
</systemPath>
</dependency>
<dependency>
<groupId>org.eclipse.core.filesystem</groupId>
<artifactId>org.eclipse.core.filesystem</artifactId>
<version>1.3.100</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/org.eclipse.core.filesystem_1.3.100.v20110423-0524.jar
</systemPath>
</dependency>
<dependency>
<groupId>org.eclipse.core.jobs</groupId>
<artifactId>org.eclipse.core.jobs</artifactId>
<version>3.5.100</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/org.eclipse.core.jobs_3.5.100.v20110404.jar</systemPath>
</dependency>
<dependency>
<groupId>org.eclipse.core.resources</groupId>
<artifactId>org.eclipse.core.resources</artifactId>
<version>3.7.100</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/org.eclipse.core.resources_3.7.100.v20110510-0712.jar
</systemPath>
</dependency>
<dependency>
<groupId>org.eclipse.core.runtime</groupId>
<artifactId>org.eclipse.core.runtime</artifactId>
<version>3.7.0</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/org.eclipse.core.runtime_3.7.0.v20110110.jar</systemPath>
</dependency>
<dependency>
<groupId>org.eclipse.datatools.connectivity</groupId>
<artifactId>org.eclipse.datatools.connectivity</artifactId>
<version>1.2.2</version>
<scope>system</scope>
<systemPath>
${basedir}/src/main/webapp/WEB-INF/lib/org.eclipse.datatools.connectivity_1.2.2.v201105270956.jar
</systemPath>
</dependency>
<dependency>
<groupId>org.eclipse.datatools.connectivity.apache.derby</groupId>
<artifactId>org.eclipse.datatools.connectivity.apache.derby</artifactId>
<version>1.0.101</version>
<scope>system</scope>
<systemPath>
${basedir}/src/main/webapp/WEB-INF/lib/org.eclipse.datatools.connectivity.apache.derby_1.0.101.v201104090305.jar
</systemPath>
</dependency>
<dependency>
<groupId>org.eclipse.datatools.connectivity.apache.derby.dbdefinition</groupId>
<artifactId>org.eclipse.datatools.connectivity.apache.derby.dbdefinition</artifactId>
<version>1.0.2</version>
<scope>system</scope>
<systemPath>
${basedir}/src/main/webapp/WEB-INF/lib/org.eclipse.datatools.connectivity.apache.derby.dbdefinition_1.0.2.v200906161815.jar
</systemPath>
</dependency>
<dependency>
<groupId>org.eclipse.datatools.connectivity.console.profile</groupId>
<artifactId>org.eclipse.datatools.connectivity.console.profile</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>
${basedir}/src/main/webapp/WEB-INF/lib/org.eclipse.datatools.connectivity.console.profile_1.0.0.v200906020553.jar
</systemPath>
</dependency>
<dependency>
<groupId>org.eclipse.datatools.connectivity.db.generic</groupId>
<artifactId>org.eclipse.datatools.connectivity.db.generic</artifactId>
<version>1.0.1</version>
<scope>system</scope>
<systemPath>
${basedir}/src/main/webapp/WEB-INF/lib/org.eclipse.datatools.connectivity.db.generic_1.0.1.v200908130547.jar
</systemPath>
</dependency>
<dependency>
<groupId>org.eclipse.datatools.connectivity.dbdefinition.genericJDBC</groupId>
<artifactId>org.eclipse.datatools.connectivity.dbdefinition.genericJDBC</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>
${basedir}/src/main/webapp/WEB-INF/lib/org.eclipse.datatools.connectivity.dbdefinition.genericJDBC_1.0.1.v200906161815.jar
</systemPath>
</dependency>
<dependency>
<groupId>org.eclipse.datatools.connectivity.oda</groupId>
<artifactId>org.eclipse.datatools.connectivity.oda</artifactId>
<version>3.3.2</version>
<scope>system</scope>
<systemPath>
${basedir}/src/main/webapp/WEB-INF/lib/org.eclipse.datatools.connectivity.oda_3.3.2.v201105200920.jar
</systemPath>
</dependency>
<dependency>
<groupId>org.eclipse.datatools.connectivity.oda.consumer</groupId>
<artifactId>org.eclipse.datatools.connectivity.oda.consumer</artifactId>
<version>3.2.4</version>
<scope>system</scope>
<systemPath>
${basedir}/src/main/webapp/WEB-INF/lib/org.eclipse.datatools.connectivity.oda.consumer_3.2.4.v201105200848.jar
</systemPath>
</dependency>
<dependency>
<groupId>org.eclipse.datatools.connectivity.oda.design</groupId>
<artifactId>org.eclipse.datatools.connectivity.oda.design</artifactId>
<version>3.3.3</version>
<scope>system</scope>
<systemPath>
${basedir}/src/main/webapp/WEB-INF/lib/org.eclipse.datatools.connectivity.oda.design_3.3.3.v201105191315.jar
</systemPath>
</dependency>
<dependency>
<groupId>org.eclipse.datatools.connectivity.oda.flatfile</groupId>
<artifactId>org.eclipse.datatools.connectivity.oda.flatfile</artifactId>
<version>3.1.1</version>
<scope>system</scope>
<systemPath>
${basedir}/src/main/webapp/WEB-INF/lib/org.eclipse.datatools.connectivity.oda.flatfile_3.1.1.v201104191557.jar
</systemPath>
</dependency>
<dependency>
<groupId>org.eclipse.datatools.connectivity.oda.profile</groupId>
<artifactId>org.eclipse.datatools.connectivity.oda.profile</artifactId>
<version>3.2.5</version>
<scope>system</scope>
<systemPath>
${basedir}/src/main/webapp/WEB-INF/lib/org.eclipse.datatools.connectivity.oda.profile_3.2.5.v201104090305.jar
</systemPath>
</dependency>
<dependency>
<groupId>org.eclipse.datatools.connectivity.sqm.core</groupId>
<artifactId>org.eclipse.datatools.connectivity.sqm.core</artifactId>
<version>1.2.2</version>
<scope>system</scope>
<systemPath>
${basedir}/src/main/webapp/WEB-INF/lib/org.eclipse.datatools.connectivity.sqm.core_1.2.2.v201104090305.jar
</systemPath>
</dependency>
<dependency>
<groupId>org.eclipse.datatools.enablement.postgresql</groupId>
<artifactId>org.eclipse.datatools.enablement.postgresql</artifactId>
<version>1.0.2</version>
<scope>system</scope>
<systemPath>
${basedir}/src/main/webapp/WEB-INF/lib/org.eclipse.datatools.enablement.postgresql_1.0.1.v200906020900.jar
</systemPath>
</dependency>
<dependency>
<groupId>org.eclipse.datatools.enablement.postgresql.dbdefinition</groupId>
<artifactId>org.eclipse.datatools.enablement.postgresql.dbdefinition</artifactId>
<version>1.0.4</version>
<scope>system</scope>
<systemPath>
${basedir}/src/main/webapp/WEB-INF/lib/org.eclipse.datatools.enablement.postgresql.dbdefinition_1.0.1.v200906161800.jar
</systemPath>
</dependency>
<dependency>
<groupId>org.eclipse.datatools.enablement.oda.ws</groupId>
<artifactId>org.eclipse.datatools.enablement.oda.ws</artifactId>
<version>1.2.2</version>
<scope>system</scope>
<systemPath>
${basedir}/src/main/webapp/WEB-INF/lib/org.eclipse.datatools.enablement.oda.ws_1.2.2.v201011041216.jar
</systemPath>
</dependency>
<dependency>
<groupId>org.eclipse.datatools.enablement.oda.xml</groupId>
<artifactId>org.eclipse.datatools.enablement.oda.xml</artifactId>
<version>1.0.2</version>
<scope>system</scope>
<systemPath>
${basedir}/src/main/webapp/WEB-INF/lib/org.eclipse.datatools.enablement.oda.xml_1.2.1.v201104121500.jar
</systemPath>
</dependency>
<dependency>
<groupId>org.eclipse.datatools.modelbase.dbdefinition</groupId>
<artifactId>org.eclipse.datatools.modelbase.dbdefinition</artifactId>
<version>1.0.2</version>
<scope>system</scope>
<systemPath>
${basedir}/src/main/webapp/WEB-INF/lib/org.eclipse.datatools.modelbase.dbdefinition_1.0.2.v201002130228.jar
</systemPath>
</dependency>
<dependency>
<groupId>org.eclipse.datatools.modelbase.derby</groupId>
<artifactId>org.eclipse.datatools.modelbase.derby</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>
${basedir}/src/main/webapp/WEB-INF/lib/org.eclipse.datatools.modelbase.derby_1.0.0.v201002161452.jar
</systemPath>
</dependency>
<dependency>
<groupId>org.eclipse.datatools.modelbase.sql</groupId>
<artifactId>org.eclipse.datatools.modelbase.sql</artifactId>
<version>1.0.4</version>
<scope>system</scope>
<systemPath>
${basedir}/src/main/webapp/WEB-INF/lib/org.eclipse.datatools.modelbase.sql_1.0.4.v201002250945.jar
</systemPath>
</dependency>
<dependency>
<groupId>org.eclipse.datatools.modelbase.sql.query</groupId>
<artifactId>org.eclipse.datatools.modelbase.sql.query</artifactId>
<version>1.1.1</version>
<scope>system</scope>
<systemPath>
${basedir}/src/main/webapp/WEB-INF/lib/org.eclipse.datatools.modelbase.sql.query_1.1.1.v201008100700.jar
</systemPath>
</dependency>
<dependency>
<groupId>org.eclipse.emf</groupId>
<artifactId>org.eclipse.emf</artifactId>
<version>2.6.0</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/org.eclipse.emf_2.6.0.v20110530-1010.jar</systemPath>
</dependency>
<dependency>
<groupId>org.eclipse.emf.common</groupId>
<artifactId>org.eclipse.emf.common</artifactId>
<version>2.7.0</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/org.eclipse.emf.common_2.7.0.v20110527-1609.jar
</systemPath>
</dependency>
<dependency>
<groupId>org.eclipse.emf.ecore</groupId>
<artifactId>org.eclipse.emf.ecore</artifactId>
<version>2.7.0</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/org.eclipse.emf.ecore_2.7.0.v20110527-1609.jar
</systemPath>
</dependency>
<dependency>
<groupId>org.eclipse.emf.ecore.change</groupId>
<artifactId>org.eclipse.emf.ecore.change</artifactId>
<version>2.7.0</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/org.eclipse.emf.ecore.change_2.7.0.v20110408-2116.jar
</systemPath>
</dependency>
<dependency>
<groupId>org.eclipse.emf.ecore.xmi</groupId>
<artifactId>org.eclipse.emf.ecore.xmi</artifactId>
<version>2.7.0</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/org.eclipse.emf.ecore.xmi_2.7.0.v20110520-1406.jar
</systemPath>
</dependency>
<dependency>
<groupId>org.eclipse.equinox.app</groupId>
<artifactId>org.eclipse.equinox.app</artifactId>
<version>1.3.100</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/org.eclipse.equinox.app_1.3.100.v20110321.jar
</systemPath>
</dependency>
<dependency>
<groupId>org.eclipse.equinox.common</groupId>
<artifactId>org.eclipse.equinox.common</artifactId>
<version>3.6.0</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/org.eclipse.equinox.common_3.6.0.v20110523.jar
</systemPath>
</dependency>
<dependency>
<groupId>org.eclipse.equinox.preferences</groupId>
<artifactId>org.eclipse.equinox.preferences</artifactId>
<version>3.4.0</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/org.eclipse.equinox.preferences_3.4.0.v20110502.jar
</systemPath>
</dependency>
<dependency>
<groupId>org.eclipse.equinox.registry</groupId>
<artifactId>org.eclipse.equinox.registry</artifactId>
<version>3.5.100</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/org.eclipse.equinox.registry_3.5.100.v20110502.jar
</systemPath>
</dependency>
<dependency>
<groupId>org.eclipse.osgi</groupId>
<artifactId>org.eclipse.osgi</artifactId>
<version>3.7.0</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/org.eclipse.osgi_3.7.0.v20110613.jar</systemPath>
</dependency>
<dependency>
<groupId>org.eclipse.osgi.services</groupId>
<artifactId>org.eclipse.osgi.services</artifactId>
<version>3.3.0</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/org.eclipse.osgi.services_3.3.0.v20110513.jar
</systemPath>
</dependency>
<dependency>
<groupId>org.eclipse.update.configurator</groupId>
<artifactId>org.eclipse.update.configurator</artifactId>
<version>3.3.100</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/org.eclipse.update.configurator_3.3.100.v20100512.jar
</systemPath>
</dependency>
<dependency>
<groupId>org.w3c.css.sac</groupId>
<artifactId>org.w3c.css.sac</artifactId>
<version>1.3.0</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/org.w3c.css.sac_1.3.0.v200805290154.jar</systemPath>
</dependency>
<dependency>
<groupId>org.w3c.dom.smil</groupId>
<artifactId>org.w3c.dom.smil</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/org.w3c.dom.smil_1.0.0.v200806040011.jar</systemPath>
</dependency>
<dependency>
<groupId>org.w3c.dom.svg</groupId>
<artifactId>org.w3c.dom.svg</artifactId>
<version>1.1.0</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/org.w3c.dom.svg_1.1.0.v201011041433.jar</systemPath>
</dependency>
<dependency>
<groupId>saaj</groupId>
<artifactId>saaj</artifactId>
<version>none</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/saaj.jar</systemPath>
</dependency>
<dependency>
<groupId>tidy</groupId>
<artifactId>tidy</artifactId>
<version>none</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/Tidy.jar</systemPath>
</dependency>
<dependency>
<groupId>viewservlets</groupId>
<artifactId>viewservlets</artifactId>
<version>none</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/viewservlets.jar</systemPath>
</dependency>
<!-- birt end -->
Put the following entries in web.xml. Please note that this enables almost all Birt including Report Designer. If you are just looking for viewer, you do not need to enable all the servlets. Also you might want ot modify the Working and Temp folders to point to the Temp directories of server, otherwise they get generated in the context of exploded war.
<!-- Default locale setting. -->
<context-param>
<param-name>BIRT_VIEWER_LOCALE</param-name>
<param-value>en-US</param-value>
</context-param>
<!-- Default timezone setting. Examples: "Europe/Paris", "GMT+1". Defaults
to the container's timezone. -->
<context-param>
<param-name>BIRT_VIEWER_TIMEZONE</param-name>
<param-value></param-value>
</context-param>
<!-- Report resources directory for preview. Defaults to ${birt home} -->
<context-param>
<param-name>BIRT_VIEWER_WORKING_FOLDER</param-name>
<param-value></param-value>
</context-param>
<!-- Temporary document files directory. Defaults to ${birt home}/documents -->
<context-param>
<param-name>BIRT_VIEWER_DOCUMENT_FOLDER</param-name>
<param-value></param-value>
</context-param>
<!-- Flag whether the report resources can only be accessed under the working
folder. Defaults to true -->
<context-param>
<param-name>WORKING_FOLDER_ACCESS_ONLY</param-name>
<param-value>true</param-value>
</context-param>
<!-- Settings for how to deal with the url report path. e.g. "http://host/repo/test.rptdesign".
Following values are supported: <all> - All paths. <domain> - Only the paths
with host matches current domain. Note the comparison is literal, "127.0.0.1"
and "localhost" are considered as different hosts. <none> - URL paths are
not supported. Defaults to "domain". -->
<context-param>
<param-name>URL_REPORT_PATH_POLICY</param-name>
<param-value>domain</param-value>
</context-param>
<!-- Temporary image/chart directory. Defaults to ${birt home}/report/images -->
<context-param>
<param-name>BIRT_VIEWER_IMAGE_DIR</param-name>
<param-value></param-value>
</context-param>
<!-- Engine log directory. Defaults to ${birt home}/logs -->
<context-param>
<param-name>BIRT_VIEWER_LOG_DIR</param-name>
<param-value></param-value>
</context-param>
<!-- Report engine log level -->
<context-param>
<param-name>BIRT_VIEWER_LOG_LEVEL</param-name>
<param-value>WARNING</param-value>
</context-param>
<!-- Directory where to store all the birt report script libraries (JARs).
Defaults to ${birt home}/scriptlib -->
<context-param>
<param-name>BIRT_VIEWER_SCRIPTLIB_DIR</param-name>
<param-value></param-value>
</context-param>
<!-- Resource location directory. Defaults to ${birt home} -->
<context-param>
<param-name>BIRT_RESOURCE_PATH</param-name>
<param-value></param-value>
</context-param>
<!-- Preview report rows limit. An empty value means no limit. -->
<context-param>
<param-name>BIRT_VIEWER_MAX_ROWS</param-name>
<param-value></param-value>
</context-param>
<!-- Max cube fetch levels limit for report preview (Only used when previewing
a report design file using the preview pattern) -->
<context-param>
<param-name>BIRT_VIEWER_MAX_CUBE_ROWLEVELS</param-name>
<param-value></param-value>
</context-param>
<context-param>
<param-name>BIRT_VIEWER_MAX_CUBE_COLUMNLEVELS</param-name>
<param-value></param-value>
</context-param>
<!-- Memory size in MB for creating a cube. -->
<context-param>
<param-name>BIRT_VIEWER_CUBE_MEMORY_SIZE</param-name>
<param-value></param-value>
</context-param>
<!-- Defines the BIRT viewer configuration file -->
<context-param>
<param-name>BIRT_VIEWER_CONFIG_FILE</param-name>
<param-value>WEB-INF/viewer.properties</param-value>
</context-param>
<!-- Flag whether to allow server-side printing. Possible values are "ON"
and "OFF". Defaults to "ON". -->
<context-param>
<param-name>BIRT_VIEWER_PRINT_SERVERSIDE</param-name>
<param-value>ON</param-value>
</context-param>
<!-- Flag whether to force browser-optimized HTML output. Defaults to true -->
<context-param>
<param-name>HTML_ENABLE_AGENTSTYLE_ENGINE</param-name>
<param-value>true</param-value>
</context-param>
<!-- Filename generator class/factory to use for the exported reports. -->
<context-param>
<param-name>BIRT_FILENAME_GENERATOR_CLASS</param-name>
<param-value>org.eclipse.birt.report.utility.filename.DefaultFilenameGenerator</param-value>
</context-param>
<!-- Viewer Filter used to set the request character encoding to UTF-8. -->
<filter>
<filter-name>ViewerFilter</filter-name>
<filter-class>org.eclipse.birt.report.filter.ViewerFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>ViewerFilter</filter-name>
<servlet-name>ViewerServlet</servlet-name>
</filter-mapping>
<filter-mapping>
<filter-name>ViewerFilter</filter-name>
<servlet-name>EngineServlet</servlet-name>
</filter-mapping>
<!-- Viewer Servlet Context Listener -->
<listener>
<listener-class>org.eclipse.birt.report.listener.ViewerServletContextListener</listener-class>
</listener>
<!-- Viewer HttpSession Listener -->
<listener>
<listener-class>org.eclipse.birt.report.listener.ViewerHttpSessionListener</listener-class>
</listener>
<!-- Viewer Servlet, Supports SOAP -->
<servlet>
<servlet-name>ViewerServlet</servlet-name>
<servlet-class>org.eclipse.birt.report.servlet.ViewerServlet</servlet-class>
</servlet>
<!-- Engine Servlet -->
<servlet>
<servlet-name>EngineServlet</servlet-name>
<servlet-class>org.eclipse.birt.report.servlet.BirtEngineServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ViewerServlet</servlet-name>
<url-pattern>/frameset</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>ViewerServlet</servlet-name>
<url-pattern>/run</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>EngineServlet</servlet-name>
<url-pattern>/preview</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>EngineServlet</servlet-name>
<url-pattern>/download</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>EngineServlet</servlet-name>
<url-pattern>/parameter</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>EngineServlet</servlet-name>
<url-pattern>/document</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>EngineServlet</servlet-name>
<url-pattern>/output</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>EngineServlet</servlet-name>
<url-pattern>/extract</url-pattern>
</servlet-mapping>
Copy the WebViewerExample\WEB-INF\tlds\birt.tld to src\main\webapp\WEB-INF\tlds. Register it in web.xml
<jsp-config>
<taglib>
<taglib-uri>/birt.tld</taglib-uri>
<taglib-location>/WEB-INF/tlds/birt.tld</taglib-location>
</taglib>
</jsp-config>
Copy the folder webcontent in WebViewerExample in BIRT directory to src\main\webapp.
Design your reports and put the report design file at src\main\webapp\reports
Accessing the report using tags inside a jsp
<%@ taglib uri="/birt.tld" prefix="birt" %>
<birt:viewer id="birtViewer" reportDesign="/reports/new_report.rptdesign"
pattern="frameset" height="500"
width="700" format="html"></birt:viewer>
membaca blog ini sangat bagus bagus info nya
ReplyDelete