0
우리는 Websphere Portal Server에 몇 개의 포틀릿을 배포했습니다. CSS 파일에는 img 태그에 대한 동작 특성이 포함되어 있습니다.img 동작 태그로 인한 다중 HTTP 요청
<link rel="stylesheet" type="text/css" title="Style"
href=''<%=request.getContextPath()+"/theme/stylesheet.css" %>'>
문제를 다음과 같이
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의 requests.In 한 결과 것을 알아 낸, 우리는 스타일 클래스가 경우에만 포함되어있다 그 request.getContextPath()가 있습니다. 실제 컨텍스트 루트로 대체하면 문제가되지 않습니다. 누군가가 그 행동 속성이 문제를 일으키는 이유를 알려주시겠습니까?