You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by wi...@freddiemac.com on 2004/05/11 23:59:58 UTC
html-el:img tag inside c:when is not translated by jspc
Dear all:
I'm having a problem with the Struts' html-el:img not being translated
when it is placed within a c:when (or c:set or any other JSTL 1.0 tag). If
the html-el:img tag is placed outside of the c tag, then it is translated
properly. I recall that this is part of the specification of JSTL.
The Struts version is 1.1 which includes JSTL version 1.0 and struts-el
packages. Web application server is WebLogic Server 8.1 SP2 Fri Dec 5
15:01:51 PST 2003 316284. JDK is Java HotSpot(TM) Server VM Version
1.4.2_02-b03 from Sun Microsystems Inc.
Here is the JSP page:
<%@ taglib uri="/WEB-INF/struts-html-el" prefix="html-el"%>
<%@ taglib uri="/WEB-INF/c" prefix="c"%>
<tr>
<c:choose>
<c:when test="${legalAgreement == 'Y' or roleCatType ==
'DC'}">
<td
colspan="2"><html-el:img srckey="sourcing.image.header.tools.news"
width="750" height="21" border=0 usemap="#header_tools_map" /></td>
</c:when>
<c:otherwise>
<td
colspan="2"><html-el:img srckey="sourcing.image.header.tools.empty"
width="750" height="21" border=0 /></td>
</c:otherwise>
</c:choose>
</tr>
<tr>
<td valign="top"><html-el:img
srckey="sourcing.image.header.main.01" width="207" height="74" alt=""
border="0" /></td>
</tr>
And here is the HTML page. Notice that the first html-el:img is not
translated, while the last one is.
<tr>
<td colspan="2"><html-el:img
srckey="sourcing.image.header.tools.news" width="750" height="21" border=0
usemap="#header_tools_map" /></td>
</tr>
<tr>
<td valign="top"><img
src="/pe/common/images/header_main_01_2.gif" height="74" width="207"
border="0" alt=""></td>
</tr>
I would appreciate any help that anyone could offer.
Thank you.
wiwit