在现有的webapp中集成BIRT [英] Integrate BIRT in existing webapp

查看:125
本文介绍了在现有的webapp中集成BIRT的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将BIRT报告引擎添加到Tomcat中的现有Web应用程序。我不需要BIRT查看器,我真的只希望能够从 http:// localhost:8080 / birt / output?这样的URL运行报告?__report = test.rptdesign& sample =我的+参数并使用不同的导出选项pdf,xls,doc,html。

I would like to add the BIRT reporting engine to an existing webapp in Tomcat. I don't need the BIRT viewer, I really only want to be able to run the reports from a url like http://localhost:8080/birt/output?__report=test.rptdesign&sample=my+parameter and use the different export options pdf, xls, doc, html.

到目前为止我找到的集成指南都包括查看器和编写我自己的servlet来处理不同的格式。

The integration guides I've found so far all include the viewer and writing my own servlets to handle different formats.

我希望有人知道我需要的报告引擎web.xml文件中的哪些servlet映射以及哪些jar我需要在lib目录中包含现有webapp中的准系统BIRT实现。

I was hoping someone knew simply which servlet mappings from the report-engine web.xml file I needed and which jars I would need to include from the lib directory for this barebones BIRT implementation in existing webapp.

推荐答案


我希望有人知道我需要的
报表引擎web.xml文件中的哪些servlet映射以及我需要的
包含来自lib目录的这些准系统BIRT实现
in现有的webapp。

I was hoping someone knew simply which servlet mappings from the report-engine web.xml file I needed and which jars I would need to include from the lib directory for this barebones BIRT implementation in existing webapp.

我没有必需我想编写自己的servlet我只是想从自己的独立webapp集成现有的报告运行时(这里在运行时按钮下)进入我现有的webapp,这样我就不必分发2个webapp来支持运行BIRT报告。对不起,如果这不是更清楚。

I didn't necessarily want to write my own servlet I just wanted to integrate the existing reporting runtime from its own standalone webapp (here under the "runtime" button) into my existing webapp, so that I don't have to distribute 2 webapps to support running BIRT reports. Sorry if that wasn't clearer.

我确实以最简单的方式解决了这个问题,以防任何人有类似的问题(使用BIRT运行时3.7.1) ):

I did work this out though, in the simplest possible fashion, in case anyone has a similar question (using BIRT runtime 3.7.1):


  1. 您只需将以下servlet映射添加到您自己的 webapp\web- inf\web.xml 文件:

<!-- Engine Servlet -->
<servlet>
    <servlet-name>EngineServlet</servlet-name>
    <servlet-class>org.eclipse.birt.report.servlet.BirtEngineServlet</servlet-class>
</servlet>

<servlet-mapping>
    <servlet-name>EngineServlet</servlet-name>
    <url-pattern>/output</url-pattern>
</servlet-mapping>


  • 中包含所有罐子web-inf\lib 运行时到您自己的 webapp\web-inf \lib 目录中。

  • Include all jars from the web-inf\lib directory of the runtime into your own webapp\web-inf\lib directory.

    然后,您可以使用输出运行.rptdesign文件来自您自己的webapp的BIRT报告网址,并指定您想要的任何格式,例如:

    You can then run .rptdesign files using the output BIRT report url from your own webapp, and specifying whatever format you want, e.g.:

    http://localhost:8080/myOwnWebapp/output?__report=test.rptdesign&__format=pdf
    http://localhost:8080/myOwnWebapp/output?__report=test.rptdesign&__format=html
    http://localhost:8080/myOwnWebapp/output?__report=test.rptdesign&__format=xls
    http://localhost:8080/myOwnWebapp/output?__report=test.rptdesign&__format=doc
    http://localhost:8080/myOwnWebapp/output?__report=test.rptdesign&__format=ppt
    

    这篇关于在现有的webapp中集成BIRT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆