2016-11-14 133 views
0

我在IE 11中收到混合內容警告。 我的頁面使用帶有各種標記庫和Apache瓦片的struts2。 我目前無法瞭解哪些資源導致此警告 - 提琴手不顯示任何內容。由於taglib引起的混合內容警告URI

我的問題是:是否有可能在JSP頁面的taglib的URI可引起混合內容的警告: 「<%@標籤庫的URI =」 http://tiles.apache.org/tags-tiles 「PREFIX =」 磚「%>」

uri是http,而頁面是在https中打開的。

謝謝。

基里爾。

更新:

的原因的確是一個標籤,但一個生成Jvascript代碼客戶端:

回答

2

的原因是下列:URL標籤:

<s:url id="contextroot" includeContext="true" forceAddSchemeHostAndPort="true" value=""/> 

這個標籤被用來訪問JQuery的主題在未來一:

<sj:head jqueryui="true" jquerytheme="cupertino" customBasepath="%{contextroot}themes" locale="en" /> 

這產生在客戶端頁面下面的HTML :

<link id="jquery_theme_link" rel="stylesheet" href="http://xxx.xxx.xxx.com/reportcenter/themes/cupertino/jquery-ui.css?s2j=3.6.1" type="text/css"/> 

自從應用程序服務器在http中運行後,其中有http。

解決方案是刪除forceAddSchemeHostAndPort =「true」。 這種路徑是相對生成的:

<link id="jquery_theme_link" rel="stylesheet" href="themes/cupertino/jquery-ui.css?s2j=3.6.1" type="text/css"/> 
0

https://blogs.msdn.microsoft.com/ieinternals/2009/06/22/handling-mixed-httpshttps-content/

根據這一點,你可能是正確的。你有沒有嘗試更改網址到taglib uri https?

+0

是的,我做了。我得到異常 org.apache.jasper.JasperException:絕對URI:https://tiles.apache.org/tags-tiles不能在web.xml或部署該應用 的jar文件來解決 我不明白它在lib中的位置。 This:「一個可能有用的技巧是使用協議相關的超鏈接,格式爲」//example.com/image.gif「。」是我嘗試的第一件事,它會產生同樣的例外。 –

相關問題