Hashtable artists=new Hashtable();
ArrayList titles=new ArrayList();
String cast="Pahwa";
titles.add(new A("shashi","bhushan"));
titles.add(new A("vijay","kumar"));
artists.put(cast,titles);
cast="Dua";
titles=new ArrayList();
titles.add(new A("sunil","kumar"));
artists.put(cast,titles);
pageContext.setAttribute("artists",artists);
and
i has been used this one for show the records
<logic:iterate id="hash" name="artists" indexId="index" >
Artist: <li><bean:write name="hash" property="key" /></li>
<logic:iterate id="array" name="hash" property="value" >
<bean:define id="a" name="array"/>
<li><bean:write name="a" property="name" /></li>
<bean:write name="a" property="value" />
</logic:iterate>
</logic:iterate>
Plz. solve my problem
----- Original Message -----
From: "Becky Norum" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, February 27, 2003 7:23 PM
Subject: Re: logic:iterate examples plz.
> I'd suggest starting with the struts examples. The struts-example.war
> provided with struts has a nice example of using <logic:iterate> in
> registration.jsp
>
> If you have a specific question of why something isn't working, post
> your code so we can get a better idea of what you are trying to do.
>
> --
> Becky Norum * [EMAIL PROTECTED]
>
>
> On Thu, 2003-02-27 at 08:41, shashi_struts wrote:
> > HI
> > I am working on the concept in which i stored string as key and
arraylist as value in the hashtable.The arraylist stores a class name A
which have two parameter name and value
> >
> >
> > I tried too much but not succeed to print the value in key,value in
wirte manner.
> >
> > Pls help me
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]