Hi all, I just want to thank everyone for their great responses, I really appreciate all the help.....GREAT THANX -----Original Message----- From: Shamdasani Nimmi-ANS004 [mailto:[EMAIL PROTECTED]] Sent: Monday, June 04, 2001 6:02 PM To: '[EMAIL PROTECTED]' Subject: RE: Any Hashmap examples used in jsp page? 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 -----Original Message----- From: Steve A Drake [mailto:[EMAIL PROTECTED]] Sent: Friday, June 01, 2001 5:58 PM To: [EMAIL PROTECTED] Subject: RE: Any Hashmap examples used in jsp page? Hi Jon. I'm having a similar problem as Dudley with a HashMap. I tried playing around with your example but couldn't get it to work within the context of what I'm doing. Perhaps another example would help. For example, I have a scriptlet that looks something like: fee.fie.fo.sql.ResultSetBean rsb = (fee.fie.fo.sql.ResultSetBean) request.getAttribute("resultBean"); java.util.HashMap hm = rsb.getProperties(); String foobar = (String) hm.get("foobar"); out.println("foobar = " + foobar); So, the ResultSetBean contains a HashMap as a property. I get a reference to the HashMap and then can extract a value with a key as input. Any ideas on the syntax of doing this with "bean" tags? TIA. On Fri, 1 Jun 2001, Jon.Ridgway wrote: > Hi Dudley, > > See code sample below. The type in the iterate tag must be as shown, you > will then need to use a bean define to put your 'value' into the page > context and cast it to whatever type you have placed in your HashMap value. > > Hope this helps, > > Jon. > > <logic:iterate id="list" name="gallery" property="artifacts" > type="java.util.Map.Entry"> > > <bean:define id="artifact" name="list" property="value" > type="net.itwa.model.artifact.IArtifact"/> > > <bean:write name="artifact" property="description"/> > > </logic:iterate> > > > -----Original Message----- > From: Dudley Butt@i-Commerce [mailto:[EMAIL PROTECTED]] > Sent: 01 June 2001 10:34 > To: [EMAIL PROTECTED] > Subject: Any Hashmap examples used in jsp page? > > Hi all, > > Could anyone please point me to where i can find some examples using > hashmaps in a jsp with struts... > Instead of using a whole bunch of logic equal tags all the time, i need a > way to evaluate a collection, looking for a specific key value, then show or > hide the relevant input boxes on my jsp.. > any help...please!!!??? > ----------------------------------------------------------- Steve Drake [EMAIL PROTECTED] UCAR / COMET (303) 497 - 8496 PO Box 3000 Boulder, CO 80307-3000