1、从eclipse官网下载birt的运行包(地址:http://www.eclipse.org/birt/)即birt-runtime-4.8.0-20180626,这是我用的版本,解压缩,先拷贝WebViewerExample\WEB-INF下如下文件到工程的WEB-INF目录下:
jrun.web.xml
server-config.wsdd
viewer.properties
2、将WebViewerExample\WEB-INF\tlds下的birt.tld文件拷贝到工程的\WEB-INF\tlds下。
3、在工程的WEB-INF下建立report-engine的文件夹,在report-engine下新建如下四个文件夹
documents
images
logs
scriptlib
4、将WebViewerExample\ webcontent文件夹拷贝到要集成的WEB应用的根目录下(感觉难受的可以选择改名);
5、在web应用的根目录下建立reportFiles文件夹,用来存放报表文件。
6、将web.xml中的如下内容拷贝到工程的web.xml中:
<!-- birt所需 -->
<!-- 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>reportFiles</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>WEB-INF/report-engine/documents</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 pat