> If you want an array available to javascript, you'll have to output it as a javascript array
Specifically, Java and Javascript do not directly communicate. JSP is processed on the server before the page is sent to the client (browser), and the javascript is processed once the page is rendered by the client (browser).
In your JSP page, if you want to get the contents of your Java array into a Javascript array then a simple solution is to output the contents of the Java array as arguments for the Javascript array.
Example
<%
String[] javaArray = {"one", "two", "three"};
out.println("<script>");
out.print("var jsArray = new Array(");
int i = 0;
for (i = 0; i < javaArray.length; i++)
out.print("\"" + javaArray[i] + "\", ");
out.println("\"" + javaArray[i] + "\")");
out.println("</script>");
%>
Page Source in Browser Will Be...
<script>
var jsArray = new Array("one", "two", "three");
</script>