The JSP executes on the server, the JavaScript on the client long after the JSP has finished executing and gone away.
Please read
this article tounderstand how JSP works and why what you are asking is impossible.
Rather, use JSP to create the data in JavaScript markup.