Hi all,
I'm having the following problem when I'm trying to access an array from a bean using JSTL. Can anyone explain for me why this doesn't work. The error Tomcat(5) using JSTL1.0 output is
Unable to find a value for "myList" in object of class "PhoneList" using operator "." (null)
These are the files I'm using
File:tester.jsp
<%@ taglib uri=" prefix="c" %>
<jsp:useBean id="list" class="PhoneList" scope="request"/>
<c:forEach items="${list.myList}" var="entry">
<cut value="${entry}";
></c:forEach>
import java.util.*;
public class PhoneList {
ArrayList myList;
public PhoneList()
{
myList = new arrayList();
myList.add("name1");
myList.add("name2");
}
public void setMyList(ArrayList l)
{ myList = l; }
public ArrayList getMyList()
{ return myList;}
}
Thanks
Erik
I'm having the following problem when I'm trying to access an array from a bean using JSTL. Can anyone explain for me why this doesn't work. The error Tomcat(5) using JSTL1.0 output is
Unable to find a value for "myList" in object of class "PhoneList" using operator "." (null)
These are the files I'm using
File:tester.jsp
<%@ taglib uri=" prefix="c" %>
<jsp:useBean id="list" class="PhoneList" scope="request"/>
<c:forEach items="${list.myList}" var="entry">
<cut value="${entry}";
></c:forEach>
import java.util.*;
public class PhoneList {
ArrayList myList;
public PhoneList()
{
myList = new arrayList();
myList.add("name1");
myList.add("name2");
}
public void setMyList(ArrayList l)
{ myList = l; }
public ArrayList getMyList()
{ return myList;}
}
Thanks
Erik