0

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.

3
  • This will help us, Please show some of your code here. Commented Jul 11, 2013 at 8:52
  • I hope this stackoverflow.com/questions/7161846/… may help you Commented Jul 11, 2013 at 8:54
  • I didn't add the jar into the servlet container's lib directory... on adding now its working fine...Thanks Commented Jul 11, 2013 at 9:20

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.