I am having problems implementing the <c:forEach> JSTL tag.
I am using Resin 3.0.

I get the following error (see below) when trying to display following JSP
code
... displays ok without the <c:forEach> tag

===========================================================================

<%@ page language="java" %>
<%@ taglib uri="jstl/fmt" prefix="fmt" %>
<%@ taglib uri="jstl/x" prefix="x" %>
<%@ taglib uri="jstl/c" prefix="c" %>
<fmt:setLocale value="en" />
<fmt:setBundle basename="application" />
<table align="center" border="2" cellspacing="2" cellpadding="2"
width="80%">
  <tr>
   <td class="fieldName"><fmt:message
key="nameLst.colheader.firstName"/></td>
   <td class="fieldName"><fmt:message
key="nameLst.colheader.lastName"/></td>
  </tr>
  <c:forEach var="item" items="${requestScope.myNameBean}">
    <tr>
     <td class="fieldContent">${item['firstName']}</td>
     <td class="fieldContent">${item['lastName']}</td>
    </tr>
  </c:forEach>
</table>

===========================================================================

Can anyone offer suggestions on where to start looking to solve this
problem.
I have searched in vain for similar problems and solutions.

Regards
Mike


 [ServletException in:/portlets/NameLst.jsp]
com.caucho.java.JavaCompileException:
C:/jasic/resin/webapps/webCMS/WEB-INF/work/_portlets/_namelst__jsp.java:0:0:
0:0: Semantic Warning: The file "classes" is not a valid directory.
C:/jasic/resin/webapps/webCMS/WEB-INF/work/_portlets/_namelst__jsp.java:0:0:
0:0: Semantic Warning: The file "C:\jasic\JRockitVM\jre\classes" is not a
valid directory.
C:/jasic/resin/webapps/webCMS/WEB-INF/work/_portlets/_namelst__jsp.java:0:0:
0:0: Semantic Warning: The file "C:\jasic\JRockitVM\jre\lib\i18n.jar" does
not exist or else is not a valid zip file. /portlets/NameLst.jsp:1: Semantic
Error: In type "ForEachTag", the checked exception "JspTagException"
specified by method "java.lang.Object getCurrent() throws
javax.servlet.jsp.JspTagException;", inherited from type
"javax.servlet.jsp.jstl.core.LoopTagSupport", is not assignable to any
exception in the throws clause of the overridden method "java.lang.Object
getCurrent();" declared in type "javax.servlet.jsp.jstl.core.LoopTag".
/portlets/NameLst.jsp:1: Semantic Error: In type "ForEachTag", the method
"java.lang.Object getLoopStatus() throws
javax.servlet.jsp.JspTagException;", inherited from type
"javax.servlet.jsp.jstl.core.LoopTagSupport", does not have the same return
type as the method "javax.servlet.jsp.jstl.core.LoopTagStatus
getLoopStatus();", inherited from type "javax.servlet.jsp.jstl.core.LoopTag.
/portlets/NameLst.jsp:1: Semantic Error: In type "ForEachTag", the checked
exception "JspTagException" specified by method "java.lang.Object
getLoopStatus() throws javax.servlet.jsp.JspTagException;", inherited from
type "javax.servlet.jsp.jstl.core.LoopTagSupport", is not assignable to any
exception in the throws clause of the overridden method
"javax.servlet.jsp.jstl.core.LoopTagStatus getLoopStatus();" declared in
type "javax.servlet.jsp.jstl.core.LoopTag". /portlets/NameLst.jsp:18:
Semantic Error: A candidate for type "ForEachTag" was found, but it is
invalid and needs to be fixed before this type will successfully compile

Reply via email to