Results 1 to 2 of 2
  1. #1
    Ms.Ranjan is offline Member
    Join Date
    Jun 2008
    Posts
    85
    Rep Power
    0

    Default Trying to display the length of the array using tags

    Hi all,

    I am looping through an array and here is my code

    Java Code:
    <TD ALIGN="center"><c:forEach var="rowcount" items="${data}" varStatus="status">
      <B> Count ${status.count}  </B></c:forEach></TD>
    The problem is the output i get
    Java Code:
    Count 1
    Count 2
    Count 3
    It loops through the array and prints each time. What I want is to display the total count alone

    Java Code:
    Count 3
    How do I go about doing this?
    Last edited by Ms.Ranjan; 07-02-2010 at 11:03 PM. Reason: Just make my question clear

  2. #2
    Ms.Ranjan is offline Member
    Join Date
    Jun 2008
    Posts
    85
    Rep Power
    0

Similar Threads

  1. Array without using Array.length
    By ranjanarr in forum New To Java
    Replies: 3
    Last Post: 05-23-2010, 09:18 AM
  2. java Array.length property
    By X-ion in forum New To Java
    Replies: 0
    Last Post: 04-07-2010, 08:45 AM
  3. Array length and printing out uninitialized array.
    By nicolek808 in forum New To Java
    Replies: 4
    Last Post: 09-10-2009, 09:12 AM
  4. Using reflection to check array type and length
    By Java Tip in forum java.lang
    Replies: 0
    Last Post: 04-23-2008, 08:15 PM
  5. Using reflection to check array type and length
    By Java Tip in forum java.lang
    Replies: 0
    Last Post: 04-14-2008, 08:42 PM

Posting Permissions

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