Do you mean jQuery's $.getJSON() function?Originally posted by Steve Dyke:
I am using getJSON to make the request.
That makes no sense. The response of the servlet -- or JSP, if the servlet is forwarding to a JSP -- should be the formatted JSON of your data.At the servlet I call my connection bean. It returns an array which I thought I was supposed to save to a session attribute List of Lists. Then the servlet returs a pass or fail back to javascript.
JavaScript knows nothing about session scoped variables. That's a server-side concept.The javascript tries to populate the table with session attribute that was set.
As JSON. What I would do is to have your servlet put the data in a request scoped attribute (session is overkill) and forward to a JSP that formats the JSON response. The callback for $.getJSON() will receive the evaluated JavaScript object that results from the JSON.How do I send my array back to calling javascript with JSON?
Originally posted by Steve Dyke:
function toString(){[native code]}
Originally posted by Steve Dyke:
Sorry but what do you mean, body of response?
Originally posted by Steve Dyke:
I seems to me that the return is what is wrong
Originally posted by Bear Bibeault:
What is being returned by the Ajax request as its response.
If you aren't using FireBug within Firefox to help debug this, you need to. Right now.
{errorString:'NoError', myArray:'[[Ljava.lang.String;@4cfd8b40'}
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |