Is it possible to have a servlet that contains an object (an ArrayList in this case) that then does the equivalent of displaying a jsp page and passing that object to the js
You can put it using request.setAttribute("myobj", myObj); see javadoc