[转载]Installing the BIRT Viewer in Tomcat

本文档详细介绍了如何将BIRT报表查看器部署到Apache Tomcat及JBoss应用服务器的具体步骤,包括安装必要的组件、配置文件路径等,并提供了测试复杂报表的方法。
from
http://www.eclipse.org/birt/phoenix/deploy/viewerSetup.php

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.

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-
  • Copy the Web Viewer Example directory(我使用的是birt-runtime-2.1.2版本,目录名是WebViewerExample) 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.

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.

Birt 2.1 Note:

  • If you are installing BIRT 2.1 or later the Web Viewer Example has been renamed to WebViewerExample.

iText and prototype.js

Verify that you have downloaded iText 1.3 and prototype.js v1.4.0(only required for BIRT 2.0.2 and earlier builds) and follow the note below:

Birt 2.0.2 Runtime Note:

  • If you are installing the BIRT 2.0.2 Runtime (J2EE Application Server Deployment), The iText and prototype files will need to be copied to the birt-runtime/Web Viewer Example directory structure.
  • Copy itext-1.3.jar to /Web Viewer Example/plugins/org.eclipse.birt.report.engine.emitter.pdf/lib.
  • Copy prototype.js v1.4.0 to /Web Viewer Example/ajax/lib.

Birt 2.1 Runtime Note:

  • If you are installing the BIRT 2.1 Runtime (J2EE Application Server Deployment), The iText file will need to be copied to the birt-runtime/WebViewerExample directory structure.
  • Copy itext-1.3.jar to /WebViewerExample/WEB-INF/platform/plugins/com.lowagie.itext/lib.

Birt 2.1.1 Runtime Note:(我使用2.1.2 Runtime

  • If you are installing the BIRT 2.1.1. or 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.

Birt 2.2M2 Runtime Note:

  • If you are installing the BIRT 2.2M2 or later Runtime (J2EE Application Server Deployment),
  • Copy itext-1.4.6.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.0.2 Note:

  • If you are installing BIRT 2.0.2 or earlier the driver needs to be copied to birt-viewer/plugins/org.eclipse.birt.report.data.oda.jdbc/drivers.

Birt 2.1 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.(实际情况和
org.eclipse.birt.report.data.oda.jdbc这个名字不太相同

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-
  • 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
    or
    http://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-
  • Copy the "Web Viewer Example" directory to your JBoss installation, under the deploy directory for your configuration. (eg) C:\jboss-4.0.3SP1\server\default\deploy.
  • Rename the Web Viewer Example directory to birt.war, so it will deploy in place.
  • Copy itext-1.3.jar (BIRT 2.1) or itext-1.4.6.jar (BIRT 2.2) to /WebViewerExample/WEB-INF/platform/plugins/com.lowagie.itext/lib.
  • (BIRT 2.1.1 or later) Copy iTextAsian.jar 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

基于51单片机,实现对直流电机的调速、测速以及正反转控制。项目包含完整的仿真文件、源程序、原理图和PCB设计文件,适合学习和实践51单片机在电机控制方面的应用。 功能特点 调速控制:通过按键调整PWM占空比,实现电机的速度调节。 测速功能:采用霍尔传感器非接触式测速,实时显示电机转速。 正反转控制:通过按键切换电机的正转和反转状态。 LCD显示:使用LCD1602液晶显示屏,显示当前的转速和PWM占空比。 硬件组成 主控制器:STC89C51/52单片机(与AT89S51/52、AT89C51/52通用)。 测速传感器:霍尔传感器,用于非接触式测速。 显示模块:LCD1602液晶显示屏,显示转速和占空比。 电机驱动:采用双H桥电路,控制电机的正反转和调速。 软件设计 编程语言:C语言。 开发环境:Keil uVision。 仿真工具:Proteus。 使用说明 液晶屏显示: 第一行显示电机转速(单位:转/分)。 第二行显示PWM占空比(0~100%)。 按键功能: 1键:加速键,短按占空比加1,长按连续加。 2键:减速键,短按占空比减1,长按连续减。 3键:反转切换键,按下后电机反转。 4键:正转切换键,按下后电机正转。 5键:开始暂停键,按一下开始,再按一下暂停。 注意事项 磁铁和霍尔元件的距离应保持在2mm左右,过近可能会在电机转动时碰到霍尔元件,过远则可能导致霍尔元件无法检测到磁铁。 资源文件 仿真文件:Proteus仿真文件,用于模拟电机控制系统的运行。 源程序:Keil uVision项目文件,包含完整的C语言源代码。 原理图:电路设计原理图,详细展示了各模块的连接方式。 PCB设计:PCB布局文件,可用于实际电路板的制作。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值