Unfortunately I just get a 500 error from the server, with no stack
trace logged in the Tomcat log, even though I surround the call with a
try and catch both JSONException and Exception. The complete code for
the servlet is attached. I am including all the Axis2 1.3 jar's in the
CLASSPATH as part of this application, and I noticed there are some
JSON-related jar's in them. I tried not including them, with the same
result.
-David
Andres Almiray wrote:
> Hi David,
>
> Do you have a full stack trace of the error? it might help to shed
> some light into your problem.
>
> Cheers,
> Andres
>
> -------------------------------------------
> http://jroller.com/aalmiray
> http://www.linkedin.com/in/aalmiray
> --
> What goes up, must come down. Ask any system administrator.
> There are 10 types of people in the world: Those who understand
> binary, and those who don't.
> To understand recursion, we must first understand recursion.
>
>
> ----- Original Message ----
> From: David Robertson <dwr...@lb...>
> To: jso...@li...
> Sent: Friday, January 11, 2008 4:40:36 PM
> Subject: [json-lib-user] hopefully simple question about JSONObject
>
> I am a newbie to Json-lib and am trying to create a JSONObject within a
> Java 1.5 servlet. I am using json-lib-2.2-jdk15.jar
>
> I have the following code:
>
> Map outputMap = new HashMap();
> outputMap.put("var1", "value1");
> JSONObject jsonObject = JSONObject.fromObject(outputMap)
>
> The servlet dies on the last line of code. I have tried the
> JSONSerializer version from the snippets as well with the same result.
> The answer is probably staring me in the face, but I don't see it.
>
>
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net <http://SourceForge.net> Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> _______________________________________________
> json-lib-user mailing list
> jso...@li...
> <mailto:jso...@li...>
> https://lists.sourceforge.net/lists/listinfo/json-lib-user
>
>
> ------------------------------------------------------------------------
> Never miss a thing. Make Yahoo your homepage.
> <http://us.rd.yahoo.com/evt=51438/*http://www.yahoo.com/r/hs>
|