When you say create them dynamically, do you mean you might need maybe one array or maybe three arrays, or do you mean you might need one element or maybe three elements??
If you don't know how many arrays you need, then you just write the client side code out with your JSP pages... I have no experience specifically with JSP, but with asp, you just use the response.write method to write out client side code...
I'm assuming in JSP, it's document.write...
If you just need to add elements on the fly, that's no problem either...
As jaredn so astutely pointed out in an earlier post, you don't have to declare how many elements you want in an array in javascript --
and if you need to put one on the back of the array, just use this
myArray[myArray.length] = whatever
because the array is 0 based, that puts another element right on the back of the array, and because you didn't specify how big you wanted the array, it just makes itself bigger.... sort of like vectors... only it just increases itself by 1 when it needs to rather than by 50%.
good luck!

Paul Prewett