I agree Rick, although I'm not sure anyone should *ever* listen to me :)
Like I said, I'm not saying NEVER use taglibs, just that SOMETIMES (well, MANY times, in my opinion) they are superfluous. THIS time, they made sense. :)
Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies www.omnytex.com
From: Rick Reumann <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> To: Struts Users Mailing List <[EMAIL PROTECTED]> Subject: Re: Working with hashmaps in my Jsp Date: Thu, 16 Sep 2004 00:08:59 -0400
Steve Lianoglou wrote the following on 9/15/2004 9:36 PM:
<logic:iterate id="hashKey" name="keys">
<%-- now "hashKey" has the string of the key into my hashmap that I do some testing with --%>
<%-- do some logic, if i like what I see, I want to pull the object at location "hashKey" out of my HashMap --%>
<bean:define id="hashObejct" name="hash" property="hashKey" />
<%-- do some other with hashObject --%>
</logic:iterate>
<c:forEach items="yourMap" var="item"> <c:if test="{item.key == ??someTest??}"> <!-- print the value --> <c:out value="${item.value}"/> <!-- put in page scope --> <c:set var="whatever" value="${item.value}"/> </c:if> </c:forEach>
Any help is appreciated.
By the way searched in Google for "how to iterate over Map using JSTL" and the second result showed how to do this:) http://www.informit.com/articles/article.asp?p=30946&seqNum=10
I only bring up google because you mentioned: "I feel like I'm trying to reach over my shoulder to scratch my ass here, because I *know* there must be a mind-nummingly easy way to do this which I'm missing. "
If you are doing all that reaching always at least try to type in what you want to do in Google:)
By the way, this is much cleaner than using sciplets so don't listen to Frank on this one:)
-- Rick
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar – get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]