I'm working on a JSP where I need to call methods on object that come from a Bean. The previous version of the page does not use JSTL and it works properly. My new version has a set up like this:
<jsp:useBean id="pageBean" scope="request" type="com.epicentric.page.website.PageBean" />
<c:set var="pageDividers" value="<%= pageBean.getPageDividers() %>" />
<c:set var="numColumns" value="${pageDividers.size()}" />
The variable pageDividers
is a List
object.
I'm encountering this issue: when I ask for pageDivider
's size, an exception is thrown. I know this is a simple JTSL error -- what am I doing wrong?
The error message is:
The function size must be used with a prefix when a default namespace is not specified
How do I correctly access or call the methods of my pageDividers
object?