У нас есть пара портлетов, развернутых на Websphere Portal Server.В файле css мы включили атрибут поведения для тега img.
img {
position:relative;
border:none;
outline:none;
behavior: expression((this.runtimeStyle.behavior="none")&&(this.pngSet?this.pngSet=true:(this.nodeName == "IMG" && this.src.toLowerCase().indexOf('.png')>-1?(this.runtimeStyle.backgroundImage = "none", this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.src + "', sizingMethod='image')", this.src = "transparent.gif"):(this.origBg = this.origBg? this.origBg :this.currentStyle.backgroundImage.toString().replace('url("', '').replace('")', ''), this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.origBg + "', sizingMethod='crop')", this.runtimeStyle.backgroundImage = "none")), this.pngSet=true) );
}
Мы выяснили, что этот тег поведения приводит к нескольким HTTP-запросам. В одном из JSP портлета мы включили стильКласс следующим образом
<link rel="stylesheet" type="text/css" title="Style"
href=''<%=request.getContextPath()+"/theme/stylesheet.css" %>'>
Проблема существует только тогда, когда у нас есть этот request.getContextPath ().Если я заменю это фактическим корнем контекста, это не вызовет проблемы.Может кто-нибудь, пожалуйста, дайте мне знать, почему этот атрибут поведения вызывает проблему?