Problem with forEach in jstl

Discussion in 'Java' started by cold80, Aug 6, 2005.

  1. cold80

    cold80 Guest

    Hi guys, I have this problem. I have an object Order that contains an
    Hashtable of objects OrderItem. Order has a method getAllOrderItems()
    to get all the items it contains. Now I would like to iterate this
    hashtable in a jsp page, using jstl. I tried:

    <c:forEach var="orderItem" items="${Order.AllOrderItems}">
    <c:eek:ut value="${orderItem.Quantity}"/>
    </c:forEach>

    But I get an error of access to the collection, because jstl can't find
    the property AllOrderItems or something like that. I've tried to return
    to the page another attribute, with the iterator of the Hashtable, and
    even if I don't get the error anymore I can't get the Quantity
    property value. What am I doing wrong? Is it because orderItem is of a
    different type of Order?

    Thank you in advange

    Cold
     
    cold80, Aug 6, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jack

    JSTL with Struts c:forEach

    Jack, Aug 5, 2003, in forum: Java
    Replies:
    2
    Views:
    16,449
    VisionSet
    Aug 5, 2003
  2. NP
    Replies:
    0
    Views:
    5,297
  3. Quick Function

    jstl does not work with foreach

    Quick Function, Jul 14, 2004, in forum: Java
    Replies:
    4
    Views:
    803
    Quick Function
    Jul 14, 2004
  4. Andrea Desole

    JSF version of JSTL forEach?

    Andrea Desole, Dec 7, 2004, in forum: Java
    Replies:
    3
    Views:
    13,557
    masterprogrammer
    Aug 21, 2006
  5. Replies:
    2
    Views:
    1,938
    willirl
    Jan 14, 2005
Loading...

Share This Page