JSTL forEach with ArrayLists/Maps/Collections..

Discussion in 'Java' started by Dave Brown, Mar 21, 2005.

  1. Dave Brown

    Dave Brown Guest

    Hi all,

    Can anyone shed some light on which type of collection is most suited
    for what scenario ?

    I have a bean which has a method that creates a resultSet. I want to
    show this in a jsp using the JSTL forEach tag, but am not sure what is
    the best thing to return.

    It seems so easy to do 90% of what I want using 1 line of code in the
    jsp in the form of <sql:query...... but I need to do a little extra
    processing also.. which means I need to call a method which creates a
    resultset the long way round.. But I'm not sure whether to return an
    array, an arraylist or a map??

    Any comments anyone ?
     
    Dave Brown, Mar 21, 2005
    #1
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.