passing json data from servlet to jsp to js file

前端 未结 2 1770
臣服心动
臣服心动 2021-02-10 09:16

I got this servlet which creates JSON data and I want to pass this data on to a jsp page which is supposed to display the data via the InfoVis toolkit.

servlet.java

2条回答
  •  梦谈多话
    2021-02-10 09:33

    The cheap and easy way is to modify the JSP so it outputs this:

    
    
    

    The downside to that is that it creates a global variable, but if you're calling init in that way, init is already a global, so that ship has sailed. :-)

提交回复
热议问题