Reputation: 355
Any ideas on what this below error is???
JSP Can't find resource for bundle java.util.PropertyResourceBundle, key el.convert
i am getting this when using a jsp. Am i missing some thing??
<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>
Upvotes: 0
Views: 16855
Reputation: 359776
You're using the same variable name count
twice. Remove the <c:set var="count" value="0" scope="page" />
. Also, you should use properties of the varStatus
, and not the value directly. It's not a primitive object.
<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>
Upvotes: 4