Hello all, I have a list of strings on my server which I am trying to get to the client in the form of an array. The code I am attempting to use is the following:
Within the jsp I have a
List<String> columns.
I am attempting the following code:
<%int j = 0; %>
for(var i = 0; i < <%=columns.size()%>; i++)
{
colArray[i] = "<%=columns.get(j++)%>";
}
This code simply returns the first element in the columns list for every element in the colArray.
I have also tried:
colArray = <%=columns.toArray()%>;
which does not work either. I feel like I am making a little mistake somewhere and am just not seeing it. Is what I am trying to do possible in the way that I am attempting?
Thanks.