I attempted to convert java array to js array. but it gives error as "k cannot be resolved to a variable".x.getrows returns array.
<% MySQLAccess x=new MySQLAccess();%>
<% String b[]=x.getRows();%>
var message="<%out.print(b[0]);%>"
console.log(message)
var data=new Array();
<% for(int k=0;k<b.length ;k++) %>
<% {%>
var temp=<%= b[k] %>
data[<% =k %>]=temp;
<%}%>
data[<% =k %>]=temp;
an error?