Hello

I'm a newbie with Google Vis API and amn currently evaluating it and I
have a curious anomaly which I can't work out. I wonder if anyone can
give advice?

My JSP has code as follows:

var query = new google.visualization.Query(
          'http://localhost:8080/myApp/googleVisAPI?tqx=version:
0.5;reqId:0;sig:5277771;');
            // Apply query language.
      query.setQuery('SQL string');

and so on.

And on the server, I currently have hardcoded:

protected void doGet(HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException {
        PrintWriter out = response.getWriter();
        System.out.println("Some text");
        out.println("google.visualization.Query.setResponse
({version:'0.5',reqId:'0',sig:'5277771',status:'ok',table:{cols:
[{id:'Col1',label:'',type:'number'},{id:'Col2',label:'',type:'number'},
{id:'Col3',label:'',type:'number'}],rows:[{c:[{v:1.0,f:'1'},{v:
2.0,f:'2'},{v:3.0,f:'3'}]},{c:[{v:2.0,f:'2'},{v:3.0,f:'3'},{v:
4.0,f:'4'}]},{c:[{v:15.0,f:'3'},{v:4.0,f:'4'},{v:12.0,f:'5'}]},{c:[{v:
1.0,f:'1'},{v:2.0,f:'2'},{v:8.0,f:'3'}]}]}});");
        System.out.println("More text");

    }

When the JSP is called, the data is passed from the servlet to JSP and
the graph is displayed. But the servlet appears to run twice, and I
see "Some text" and "more text" displayed twice in the server's
output.

This also happens when the reqId and sig parameters are omitted.

Does anyone know why this is?

Martin O'Shea.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to