如何从 birt javascript 访问 servlet 上下文参数?

发布于 2024-12-28 04:36:51 字数 537 浏览 3 评论 0原文

我有一个以动态 xml 文件作为数据源的报告。 该文件是先前生成的以启动报告,并像报告参数一样发送。

所以我在“属性绑定”中声明了一个带有目标的数据源:

"/path_to_folder_with_generated_files/data/" + params["dynamic_xml_file"].value

此时,一切顺利。

但我需要“/path_to_folder_with_ generated_files/data/”将是

{BIRT_VIEWER_WORKING_FOLDER} + "/data/" + params["dynamic_xml_file"].value

{BIRT_VIEWER_WORKING_FOLDER} 将是 web.xml 部署描述符中声明的上下文参数的值。

如何从 birt javascript 访问上下文参数?

环境:Birt 3.7.1部署在Glassfish 3.1、ubuntu linux、jdk 1.6

I have a report with a dynamic xml file as datasource.
This file is generated previously to launch the report and is send like a report parameter.

So I declared a datasource with target in "property binding":

"/path_to_folder_with_generated_files/data/" + params["dynamic_xml_file"].value

At this point, go all right.

But i need that "/path_to_folder_with_generated_files/data/" will be

{BIRT_VIEWER_WORKING_FOLDER} + "/data/" + params["dynamic_xml_file"].value

where {BIRT_VIEWER_WORKING_FOLDER} will be the value of this context parameter declared in web.xml deploy descriptor.

How do i access to context parameters from birt javascript?

Environment: Birt 3.7.1 deployed in Glassfish 3.1, ubuntu linux, jdk 1.6

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

哭泣的笑容 2025-01-04 04:36:51

解决方案: http://www.eclipse.org /forums/index.php/mv/msg/277462/780873/#msg_780873

reportContext.getHttpServletRequest().getSession().getServletContext().getInitParameter("BIRT_VIEWER_WORKING_FOLDER") + "/data/" + params["dynamic_xml_file"].value

谢谢,杰森.

Solution in: http://www.eclipse.org/forums/index.php/mv/msg/277462/780873/#msg_780873

reportContext.getHttpServletRequest().getSession().getServletContext().getInitParameter("BIRT_VIEWER_WORKING_FOLDER") + "/data/" + params["dynamic_xml_file"].value

Thnaks, Jason.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文