Bug 13394

Summary: fmt:param (as part of a fmt:message tag) doesn't seem to work properly after tomcat upgrade
Product: Taglibs Reporter: jason
Component: Standard TaglibAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: P3    
Version: 1.0   
Target Milestone: ---   
Hardware: Other   
OS: Linux   

Description jason 2002-10-08 02:17:29 UTC
I've just upgraded to JBoss3.0.3+Tomcat 4.1.12 from JBoss3.0.3+Tomcat4.0.4.  In
doing so, fmt:message (standard taglib 1.0.1) doesn't seem to work properly anymore.

The code I'm using is for error handling:

<ul>
<!-- <c:out value="${requestScope.com_mobiletxt_errors}" /> -->
<c:forEach var="err" items="${requestScope.com_mobiletxt_errors}">
<li class="error"><fmt:message key="${err.code}" bundle="${syse}">
      <c:forEach var="arg" items="${err.arguments}">
        <fmt:param><c:out value="${arg}" /></fmt:param>
      </c:forEach>
    </fmt:message></li>
</c:forEach>
</ul>

com_mobiletxt_errors is a list of error objects.  Each error object contains a
code and an array of arguments.  The html output I get is below.  As you can see
from the commented html, the code is the same for each error object in the list
but the arguments array is different for each one (as expected). 

However in the actual output of the fmt:message tag, it seems to use the first
argument for each one.  I've tested this and if there were 10 errors in the
list, you would get 10 messages with that same first argument used (hope that
makes sense).

<ul>

<!-- [code=data.missing_value,args=[gateway], code=data.missing_value,args=[smsc
ID]] -->

<li class="error">gateway is a required value</li>

<li class="error">gateway is a required value</li>

</ul>


Any ideas as to where the problem might lie?

Thanks,
Jason
Comment 1 Jan Luehe 2002-10-08 23:06:15 UTC
Fix is available in nightly build and will be made available in upcoming
standard taglib 1.0.2 release.

*** This bug has been marked as a duplicate of 11204 ***
Comment 2 jason 2002-10-09 00:58:14 UTC
Thanks for the prompt response.  That's definitely fixed the problem.

jb