2016-11-14 77 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“。”是我尝试的第一件事,它会产生同样的例外。 –