0

关于以下错误的任何想法??? JSP Can't find resource for bundle java.util.PropertyResourceBundle, key el.convert我在使用 jsp 时得到了这个。我错过了什么吗?

 <c:set var="count" value="0" scope="page" />

                      <c:forEach items="${usersList}" var="userNames" >
                      <c:set var="counter" value="${count + 1}" scope="page"/>
                      <li class="msImages">
                      <c:choose>
                      <c:when test="${counter lt '4'}">
                          <p> <span> I am creating an image</span>

                           </p>
                         </c:when>
                        <c:when test="${counter eq '4'}">
                                  <span>See More </span>
                                  </c:when>

                         </c:choose>

  </li>
4

1 回答 1

3

count两次使用相同的变量名。删除<c:set var="count" value="0" scope="page" />. 此外,您应该使用的属性varStatus而不是直接使用值。它不是原始对象。

<c:forEach items="${usersList}" var="userNames" varStatus="stat">
    <c:set var="counter" value="${stat.count + 1}" scope="page"/>
    <li class="msImages">
        <c:choose>
            <c:when test="${counter lt 4}">
                <p> <span> I am creating an image</span> </p>
            </c:when>
            <c:when test="${counter eq 4}">
                <span>See More </span>
            </c:when>
        </c:choose>
    </li>
</c:forEach>
于 2012-08-27T19:18:00.777 回答