0

I have two files, file1.js and file2.jsp. file2.jsp is printing a jsonArray in the following way:

List<HashMap<String,String>> orderDetailsList1=  null;
JSONArray jsonArray = new JSONArray(orderDetailsList1);
out.println(jsonArray);

I want to use this jsonArray in file1.js. How do I do that?

Shek
  • 1
  • 2
  • 8
  • May be a duplicate of http://stackoverflow.com/questions/3832792/access-java-servlet-jsp-jstl-el-variables-in-javascript ? – Jozef Chocholacek Sep 13 '16 at 06:17
  • @JozefChocholacek I don't think it is the same thing as I'm asking. The javascript is not in the jsp. Both of them are separate files and I can't figure out how to use value from the jsp file in the js file. (Both are different files!) – Shek Sep 13 '16 at 16:11

0 Answers0