Supereme
Supereme

Reputation: 2409

ClassNotFoundException: class JSONObject

I want a servlet to return json on ajax request. For that I imported org.json.jar. But I am getting ClassNotFoundException for the class 'JSONObject' when I hit the url of the servlet.

I have included the jar in classpath too.

Upvotes: 0

Views: 111

Answers (1)

cahn
cahn

Reputation: 1369

Did you copy the jar file to your servlet container's lib directory? (like WEB-INF/lib)

Upvotes: 1

Related Questions