Results 1 to 3 of 3
  1. #1
    abhilasha is offline Member
    Join Date
    Aug 2011
    Posts
    6
    Rep Power
    0

    Default printing arraylists in an table

    how to print arraylist object contents in the same design page.

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,254
    Rep Power
    19

  3. #3
    gopakumar is offline Member
    Join Date
    Oct 2011
    Posts
    3
    Rep Power
    0

    Default Re: printing arraylists in an table

    It is simple , save that Arraylist object in some scope and use <c:forEach> to iterate over it as follows:
    <table>
    <c:forEach items="${requestScope.nameslist}" var ="names">
    <tr>
    <td>name:</td><td>${names}</td>
    </tr>
    </c:forEach>
    </table>
    Hope this will help you.

Similar Threads

  1. Replies: 9
    Last Post: 08-19-2011, 12:59 AM
  2. printing string backwards and printing every other
    By droidus in forum New To Java
    Replies: 22
    Last Post: 03-10-2011, 09:17 AM
  3. ArrayLists
    By Freakzoyd in forum New To Java
    Replies: 4
    Last Post: 11-12-2010, 04:27 AM
  4. Printing a table with a for loop help
    By shroomiin in forum New To Java
    Replies: 2
    Last Post: 10-31-2009, 01:47 AM
  5. Printing a table with a for loop help
    By shroomiin in forum New To Java
    Replies: 1
    Last Post: 10-31-2009, 01:41 AM

Posting Permissions

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