我希望有人能简单地知道我需要从报告引擎web.xml文件中的哪些servlet映射,以及我需要从lib目录中包括哪些jars,以便在现有webapp中实现该准系统BIRT。
我并不一定要编写自己的servlet,我只是想将其独立的webapp(此处位于“
runtime”按钮下)中的现有报告运行时集成到我的现有webapp中,因此我不必分发2个webapp支持运行BIRT报告。抱歉,如果不清楚。
我确实以最简单的方式解决了这个问题,以防万一有人有类似的问题(使用BIRT运行时3.7.1):
- 您所需要做的就是将以下servlet映射添加到您自己的
webappweb-infweb.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>
- 将运行时目录中的 所有 jar 都 包含到您自己的目录中。
web-inflib
webappweb-inflib
然后,您可以使用
output自己Web应用程序中的BIRT报告网址运行.rptdesign文件,并指定所需的格式,例如:
http://localhost:8080/myOwnWebapp/output?__report=test.rptdesign&__format=pdfhttp://localhost:8080/myOwnWebapp/output?__report=test.rptdesign&__format=htmlhttp://localhost:8080/myOwnWebapp/output?__report=test.rptdesign&__format=xlshttp://localhost:8080/myOwnWebapp/output?__report=test.rptdesign&__format=dochttp://localhost:8080/myOwnWebapp/output?__report=test.rptdesign&__format=ppt



