Bear Bibeault wrote:Using a JSP to generate the JSON is a major problem. Use a servlet instead.
Thanks for your Reply.
Yes as per your suggestion i changed jsp and declared as servlet.
Below is the servlet is had written.
and when i run the following script, to my surprise the servlet thrown a weird errortrace which is
As it clearly states that org.apache.log4j.Category class is missing, i verified my log4j-1.2.16.jar and it contains the mentioned class.
Just for debugging i thought of removing the log4j jar and run, i did it and it executed correctly. and given response correctly.
But for my project the log4j-1.2.16.jar is mandatory for logging.
I am little bit confused with the jars that are required for using json. In a example i saw that the required jars are.
commons-lang 2.3
commons-beanutils 1.7.0
commons-collections 3.2
commons-logging 1.1
ezmorph 1.0.4.jar
json-lib-2.2.2-jdk15.jar
I added all those jars and as i said early my project requires log4j as well.
so the WEB-INF/lib folder contains all the list of jars mentioned along with log4j-1.2.16.jar.
But it json isn't working if i have log4j.jar in my lib folder.
Am i doing any mistake or please let me know the procedure which is greatly appreciated.