Can u tell me how to store the values that are retrieved from the serverside on the clientside

For ex i retrieved values from database using JSP and i want to store them in a Java script array so that they can be used afterwards for clientside working.

Thanks in advance