• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Expression Language not supported in compile time attribute items

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I am trying to use JSTL foreach tag to iterate over a collection stored in a java bean with application scope. I am getting a jsp parse exception with the following error string: Expression Language not supported in compile time attribute items on line
<c:forEach var="category" items="${reportMgr.reportCategories}" varStatus="status">

My understanding is that I can still use the jsp:useBean tag, set the object id in this tag and then refer to object id in the jstl tags via EL.
What am I missing?

thanks!


Here is the code snippet:

<jsp:useBean id="reportMgr" scope="session" class="oracle.emarket.dashboard.data.ReportManager">
<table width="100%" height="34" border="0" cellpadding="0" cellspacing="0">
<tbody>
<c:forEach var="category" items="${reportMgr.reportCategories}" varStatus="status">
<tr valign="top">
<td width="11" height="34" rowspan="2"><img height="34" alt="" src="imgs/hp_bar_leftside.gif" width="11" border="0"></td>
<td height="23" valign="middle" nowrap class="textB" background="imgs/hp_button_middle1.gif">
<a href="#" class="textB">
<span class="textB">  <c ut value="${category}"/>  </span>
</a>
</td>
<c:choose>
<c:when test="${fn:length(category) = status.count}">
<td width="21" rowspan="2"><img height="34" alt="" src="imgs/hp_button_side-right.gif" width="21" border="0"></td>
</c:when>
<c therwise>
<td width="21" rowspan="2"><img height="34" alt="" src="imgs/hp_button_middle2.gif" width="21" border="0"></td>
</c therwise>
</c:choose>
<td width="100%" rowspan="2" background="imgs/hp_test.gif"> </td>
<td width="1" rowspan="2" align="right" background="imgs/hp_bar_rightside.gif"><img src="imgs/hp_spacer.gif"></td>
</tr>
<tr>
<td background="imgs/hp_button_middle2.gif" width="125" height=11><img height=1 alt="" src="imgs/hp_spacer.gif" width=1 border=0></td>
</tr>
</c:forEach>
</tbody>
</table>
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which version of the JSTL, and if 1.0, which TLD are you using?
 
Rachel McNamara
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your reply! I am using JSTL 1.0 core library with Oracle's oc4j version 10g, which uses standard.jar. I dont think i need to add a taglib in my web.xml but I tried it anyway (mapping to standard.jar and then to c.tld) and got a different error message that said foreach was not in the namespace...;-(
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you using the "c" or the "c-rt" tld file?
 
Rachel McNamara
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks again for your reply - sorry i have been MIA and I hope you might still have an answer for me! I am using the c.tld....
 
Rachel McNamara
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
the c.tld is contained in the standar.jar
reply
    Bookmark Topic Watch Topic
  • New Topic