Maybe:

<c:set var="mapName" value="${year}account"/>
<c:forEach var="account" items="${sessionScope[mapName]}">
...

Quoting Wendy Smoak <[EMAIL PROTECTED]>:

> 
> In a Struts Action, I place a Map in session scope depending on what
> year the user has chosen-- there may be Maps there named 2002accounts,
> 2001accounts, etc.
> 
> Now to display the contents of the Map, I tried:
> <c:forEach items="${year+'accounts'}" var="account">
> 
> org.apache.jasper.JasperException: An error occurred while evaluating
> custom action attribute "items" with value
> "${accountForm.map['year']+'accounts'}": An exception occured trying to
> convert String "accounts" to type "java.lang.Long"
> 
> How can I convince it that '2002' is just a String?  I've tried other
> variations, and sometimes it complains about a Double instead of a Long.
> 
> I tried flipping the order so it's 'accounts2002' but I got the same
> error.  I bet this is very simple and I'm just not awake yet...
> 
> -- 
> Wendy Smoak
> Application Systems Analyst, Sr.
> ASU IA Information Resources Management 

-- 
Kris Schneider <mailto:[EMAIL PROTECTED]>
D.O.Tech       <http://www.dotech.com/>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to