我在Apache Tomcat 7中安装了Birt查看器,但是在应用程序上运行报告时,我有一个错误:

java.lang.IllegalStateException: The viewing session is not available or has expired

我在另一台PC上迈出了相同的步骤,一切顺利。

我读了许多谈论它的帖子,但是两个解决方案都没有解决问题。主要的是 这个.

有帮助吗?

解决方案

尽管应用程序在Firefox和Chrome中运行良好,但仅在IFRAME内部打开报告时,仅在使用FrameSet时,我才在IE浏览器中遇到相同的错误。

有两种方法可以解决此问题:

  1. 将IE的安全性降低至低或将站点添加到受信任的情况下。
  2. 在IFRAME打开报告之前,请将AJAX函数调用到某些测试报告。

    for ex:

    ajaxRequest.open("GET","http://localhost:8080/birt/frameset?__report=test.rptdesign");
    

我必须选择第二种选择,因为在我的情况下,我不能要求用户降低安全性或信任我们的网站。

其他提示

我遇到了这个问题,但我的问题是报告的URL路径,请看:

我的iframe:

<iframe src="#{var.ipserver}/birt/frameset?__report=report/report/balance/balance_card.rptdesign" width="900" height="600"/> 

当在浏览器中渲染iframe时,URL是:

<iframe src="http://192.168.0.111//birt/frameset?__report=report/balance/balance_card.rptdesign" width="900" height="600"></iframe>

IP之后有双重斜线,这是问题所在,当我修复它时(如下所示),它起作用了!

  <iframe src="#{var.ipserver}birt/frameset?__report=report/report/balance/balance_card.rptdesign" width="900" height="600"/> 
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top