Calvin Hill

Url Call, Calls Servlet Twice

Recommended Posts

The chart renders but the servlet get's called twice. Here is the code.

<script language="JavaScript" src="/dashboards/FusionCharts/Charts/FusionCharts.js"></script>

var myChart = new FusionCharts("/dashboards/FusionCharts/Widgets/Bulb.swf", "newUnderTwoId", "50", "50", "0", "0");

myChart.setChartDataUrl("/dashboards/report-scripts/alerts/alerts.groovy?status=New%26range=2", "xml");
myChart.render("chartdiv1");

 

 

The servlet is report-scripts which captures the parameters and turns arounds and runs a groovy script. The groovy script creates the XML and puts it back out on the stream. I am also logging the XML to our log file, plus other information. The xml and other information is shown twice in the log file. I made sure I didn't duplicate any code. I also pasted the URL http://localhost:8443/dashboards/report-scripts/alerts/alerts.groovy?status=New%26range=2 into the address bar. It calls my servlet only once, I only see the xml and other information once in the log file.

 

It isn't a big deal since I can get it to render, but sure would be nice not to have it make two requests. Any ideas?

 

Using FusionCharts 3.2.2 and Widgets 3.1. Oh, I just thought of this, is it ok that I am using the newer FusionCharts.js than what was given with Widgets?

 

Thanks

Calvin

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now