Item value in JSTL foreach loop not working in Portlet

Posted by danimajo on Stack Overflow See other posts from Stack Overflow or by danimajo
Published on 2010-03-29T07:21:34Z Indexed on 2010/03/29 7:23 UTC
Read the original article Hit count: 344

Filed under:
|

Given the following Portlet Code:

ArrayList nameList = new ArrayList();
nameList.add("Willi Willisch");
nameList.add("Seppi Seppisch");

renderRequest.setAttribute("names", nameList);

And the following JSP Code:

<c:forEach var="aName" items="${names}">
    <tr>
       <td>${aName} </td>
    </tr>

</c:forEach>

Prints out:

${aName}
${aName}

I don't have any clue why a $(aName) isn't evaluated. The forEach loops works, because ${aName} is printed out twice ....

© Stack Overflow or respective owner

Related posts about jsp

Related posts about portlet