【问题标题】:using iframe to show file in https使用 iframe 在 https 中显示文件
【发布时间】:2012-12-04 17:42:15
【问题描述】:

我正在使用 apache-tomcat-7 并为 https 测试我的 Web 应用程序。

evrythig 工作正常,除了 iframe 组件。

我正在使用 iframe 显示文件,如下所示:

Iframe src="#{myBean.aFilePathForPriview}"...

myBean.aFilePathForPriview 是保存文件路径的字符串。 (例如:C:\somefolder\somefile.txt) 这个 iframe 工作正常在 http 应用程序上,但似乎试图将文件安全 https 页面不起作用。

仅当我允许在浏览器上打开不安全的数据时才打开 I 框架。

【问题讨论】:

    标签: iframe https


    【解决方案1】:

    我发现,如果您尝试打开的文件位于您的 WebContent 内(在您的项目内)的文件夹中,则 iframe 将在您的服务器使用 ssl 时安全地传递该文件。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-04-29
      • 1970-01-01
      • 2015-11-05
      • 1970-01-01
      • 2020-11-05
      • 1970-01-01
      • 2012-06-24
      • 2013-03-03
      相关资源
      最近更新 更多