开发者

Java Json parser

开发者 https://www.devze.com 2023-03-21 10:18 出处:网络
I\'m using tomcat 5 and JSON parser net/sf/json. I import json-lib2.4-jdk15.jar in my project and add it to `common/endorsed\' dir in my开发者_开发问答 tomcat. But when I start my servlet I have this

I'm using tomcat 5 and JSON parser net/sf/json. I import json-lib2.4-jdk15.jar in my project and add it to `common/endorsed' dir in my开发者_开发问答 tomcat. But when I start my servlet I have this exception:

java.lang.NoClassDefFoundError: net/sf/json/JSONException
net.sf.json.JSONSerializer.toJSON(JSONSerializer.java:108)
net.sf.json.JSONSerializer.toJSON(JSONSerializer.java:84)
com.britecs.atajer.bl.json.SubCategories.getSubCategory(SubCategories.java:37)
com.britecs.atajer.pl.json.SubCategoriesServlet.doGet(SubCategoriesServlet.java:23)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

Can someone help me?


I'm not sure 'tomcat/common/endorsed' is the right directory to be using. Have you tried installing your JAR file in tomcat/lib?

0

精彩评论

暂无评论...
验证码 换一张
取 消