I’ve been working local on tomcat server 7, now I uploaded my project to a server but it has tomcat 6. So the following doesn’t work:
model.addAttribute("category",cat);
<div class="span4">
<h2>
Category:
<c:out value="${category}" />
</h2>
<br />
<c:forEach items="${categoryList}" var="item">
<div class="alert alert-init">
<c:url value="/getInit/${item.getiID()}" var="url" />
<a href="${url}"><c:out value="${item.getTitle()}" /></a>
</div>
</c:forEach>
</div>
It gives me following error code:
org.apache.jasper.JasperException: /WEB-INF/views/categoryinitiatives.jsp(34,5) The function iIDGetter must be used with a prefix when a default namespace is not specified
I’ve been searching all over the web to find a solution for this problem, but without success. Does anyone know how to fix this?
If you wanna access a property of a bean using EL, just write
item.titleinstead ofitem.getTitle(). It will automatically call the getter and probably solve your problem.Moreover,
item.getiID()isn’t a valid name. If you have a propertyiIDin your bean, you have to name the gettergetIID()to access it using EL. Have a look at the lowerCamelCase syntax.