Results 1 to 2 of 2

Thread: Use <c:forEach with Sping

  1. #1

    Default Use <c:forEach with Sping

    Action Class Form id: createAssetForm (representing CreateAssetForm.class)
    List lstAstMainContributors is an attribute of the CreateAssetForm OBJECT.

    Now try to use the forEach to loop through eacg of the record. instead of using:

    createAssetForm.lstAstMainContributors[0]
    createAssetForm.lstAstMainContributors[1]
    ...


    USE:
    <c:forEach var="mContributor" items="${createAssetForm.lstAstMainContributors}" varStatus="loopStatus">
    ...


    When test running, the returned error:

    Tried to display a JSPG0124E: Custom tag attribute items cannot be runtime expression. value: "[${createAssetForm.lstAstMainContributors}]"


    What could be wrong?

    Thanks to help.

  2. #2
    Join Date
    Aug 2004
    Location
    Hawaii, US
    Posts
    225

    Default

    I suspect you are using a very old version of the JSTL taglibs. Make sure you are using the latest version, and using the latest URI in your <%@ taglib %> declaration.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •