Error I got while trying to make json work in a jsp page . How to debug this?

后端 未结 3 958
我在风中等你
我在风中等你 2021-01-19 03:33
<%@ page language=\"java\" import=\"net.sf.json.JSONArray\" %>

 <%
  JSONArray arrayObj=new JSONArray();
   arrayObj.add(\"MCA\");
   arrayObj.add(\"Amit K         


        
相关标签:
3条回答
  • 2021-01-19 04:26

    I also had the same problem, make sure you Download JSONLibraries and place it into Tomcat's lib directory . Also restart the server before executing your jsp file.

    0 讨论(0)
  • 2021-01-19 04:34

    I had the same problem it is solved after i placed json libraries in WEB-INF\lib folder If you are using eclipse it helps to clean build once.

    --Kiran.Kumar

    0 讨论(0)
  • 2021-01-19 04:35

    Either the JSON library is not there where you think it is, or the JAR file of the JSON library which you've downloaded simply doesn't contain that class. Investigate the JAR file using a ZIP or RAR tool. There should be a net/sf/json/JSONArray.class file inside the JAR. If it is missing, then you probably downloaded the wrong library.

    0 讨论(0)
提交回复
热议问题