I don't think what you are trying to do should be done in the JSP by a
struts/custom tag.
Why not copy the value objects in the HashMap to an array based on the order
of the keys in your String array? Then pass the array to the JSP instead of
the HashMap. If you need the keys and they aren't attributes of the value
objects then you can pass the String array of keys to the JSP too.
> -----Original Message-----
> From: Steve A Drake [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 04, 2001 5:41 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: Any Hashmap examples used in jsp page?
>
>
> On Mon, 4 Jun 2001, Shamdasani Nimmi-ANS004 wrote:
>
> > Steve,
> >
> > This is how I used a HashMap in a jsp:
> >
> > <logic:iterate id="item" name="user_list" property="userList" >
> >
> > <TR>
> > <TD><bean:write name="item" property="key"/></TD>
> > <TD><bean:write name="item" property="value"/></TD>
> > </TR>
> >
> > </logic:iterate>
> >
> > getUserList() method in my user_list bean returns a HashMap.
> >
> > Hope this helps.
> >
> > -Nimmi
>
> Hi Nimmi. Your example would work fine if I didn't care
> about the order
> in which the key/value pairs are displayed. Unfortunately, I need to
> display them in a particular order (given by a String[] of keys).
>